Misc Metods
Opens a link in the user's browser.
Parameters:
url - The url you want to open
Example:
sendMessage("Look at this video on ...");
openLinkInBrowser("http://website.com/....");
Sleeps the thread for the given duration (basically waits for the given amount of time before continuing with the code).
Parameters:
seconds - The amount of seconds you want to wait before continuing with the following code
Example:
sendMessage("Rest before you start again");
sleep(randomInteger(10, 25));
Sleeps the thread for the given duration (basically waits for the given amount of time before continuing with the code).
Parameters:
amount - The amount of the given time unit you want to wait before continuing with the following code
timeUnit - The time unit
Example:
sendMessage("Rest before you start again");
sleep(randomInteger(10, 25), "SECONDS");
Wait for the given duration (basically waits for the given amount of time before continuing with the code). However this allows the thread to be notified internally to continue (for example when a sub sends a message). Only use this when you know what you are doing.
Parameters:
seconds - The amount of seconds you want to wait before continuing with the following code
Example:
sendMessage("Rest before you start again");
wait(randomInteger(10, 25));
Wait for the given duration (basically waits for the given amount of time before continuing with the code). However this allows the thread to be notified internally to continue (for example when a sub sends a message). Only use this when you know what you are doing.
Parameters:
amount - The amount of the given time unit you want to wait before continuing with the following code
timeUnit - The time unit
Example:
sendMessage("Rest before you start again");
wait(randomInteger(10, 25), "SECONDS");