misc
The misc
namespace contains functions that don’t fit into their own namespace (either due to what they are for, or not having enough functions of the same type) that help with various things.
Functions exposed by this namespace are accessed via the prefix: hook.misc.
Functions
get_clipboard
Returns the current string in the clipboard.
1string|nil hook.misc.get_clipboard();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(string | nil) The clipboard string on success, nil otherwise. |
set_clipboard
Sets the clipboard to the given string.
1boolean hook.misc.set_clipboard(str);
Parameter Name | Type | Description |
---|
str | string | The string to set the clipboard to. |
Returns |
---|
(boolean) True on success, false otherwise. |
hide_console
Hides the debug console window.
1hook.misc.hide_console();
Parameter Name | Type | Description |
---|
None. | | |
show_console
Shows the debug console window.
1hook.misc.show_console();
Parameter Name | Type | Description |
---|
None. | | |
execute
Executes a program on the local machine.
1hook.misc.execute(path, args, mode);
Parameter Name | Type | Description |
---|
path | string | The path to the progam to execute. |
args | string | The arguments to pass to the program. |
mode | number | [Optional] The show command mode to execute the program with. |
open_url
Opens a url within the local machines default browser.
1hook.misc.open_url(url);
Parameter Name | Type | Description |
---|
url | string | The website url to open. |
play_sound
Plays a sound file. (Plays async via PlaySoundA)
1hook.misc.play_sound(path);
Parameter Name | Type | Description |
---|
path | string | The path to the sound file to play. |
If path
is an empty string, then any previous playing sound will be stopped.