User Tools

Site Tools


addons:functions:misc

Misc Namespace

The misc namespace contains various functions that do not qualify to be in another namespace or warrant their own namespace at this time.

You can access these functions via:

ashita.misc.


ashita.misc.open_url

Opens an url using the systems default browser.

void ashita.misc.open_url(url);

  • Parameters
    • url - (string) The url of the site to open.
  • Returns
    • Function does not return a value.

ashita.misc.play_sound

Plays a sound file.

void ashita.misc.play_sound(file);

  • Parameters
    • file - (string) The sound file to play.
  • Returns
    • Function does not return a value.

ashita.misc.get_clipboard

Obtains the clipboard text of the system.

string ashita.misc.get_clipboard();

  • Parameters
    • Function does not have any parameters.
  • Returns
    • string - The clipboard text, nil on error.

ashita.misc.set_clipboard

Sets the clipboard text.

bool ashita.misc.set_clipboard(text);

  • Parameters
    • text - (string) The text to set the clipboard to.
  • Returns
    • bool - True on success, false otherwise.

ashita.misc.execute

Executes an application via ShellExecute.

void ashita.misc.execute(path, args, mode);

  • Parameters
    • path - (string) The path to the file to execute.
    • args - (string) The arguments to pass to the file when it launches.
    • mode - (number) The mode to pass to the application when it launches. (Optional, default is SW_SHOWMINNOACTIVE.)
  • Returns
    • Function does not return a value.

ashita.misc.hide_console

Hides the console window of the process, if present. (Useful for hiding private server boot loaders.)

void ashita.misc.hide_console();

  • Parameters
    • Function does not have any parameters.
  • Returns
    • Function does not return a value.

ashita.misc.show_console

Shows the console window of the process, if present. (Useful for showing private server boot loaders.)

void ashita.misc.hide_console();

  • Parameters
    • Function does not have any parameters.
  • Returns
    • Function does not return a value.

If a console window has not been created for the process yet, a new one will be created by calling this function.

addons/functions/misc.txt · Last modified: 2017/04/22 01:14 by atom0s