On Load
From UBot Studio
(Difference between revisions)
(Created page with " This command is a Flow Command. Commands inside of this command will run when the bot is loaded or the tab is loaded. It is recommended for loading variable...") |
(→Example) |
||
(4 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
This command is a [[Flow Commands|Flow Command]]. Commands inside of this command will run when the bot is loaded or the tab is loaded. | This command is a [[Flow Commands|Flow Command]]. Commands inside of this command will run when the bot is loaded or the tab is loaded. | ||
− | |||
− | The | + | It is recommended for loading variables and setting values when a bot is opened or a tab is loaded. |
+ | |||
+ | It is not recommended for running full navigating scripts as soon as the bot loads. Doing so will cause the bot to freeze until all commands are run. | ||
+ | |||
+ | |||
+ | '''Event Type:''' The event type determines what event will trigger the containing commands to run. The options are: | ||
+ | |||
+ | *Bot Loaded: The commands within the command are run when the bot is loaded | ||
+ | |||
+ | *Tab Loaded: The commands within the command are run when the tab is loaded | ||
− | |||
− | |||
== Example == | == Example == | ||
Line 18: | Line 24: | ||
ui stat monitor("Numbers", "{#one}{#two}{#three}") | ui stat monitor("Numbers", "{#one}{#two}{#three}") | ||
</pre> | </pre> | ||
+ | |||
+ | [[File:onload00.jpg]] | ||
+ | |||
The script above will load the values within the set commands when the tab is loaded. | The script above will load the values within the set commands when the tab is loaded. | ||
+ | |||
<pre> | <pre> | ||
Line 30: | Line 40: | ||
</pre> | </pre> | ||
+ | |||
+ | [[File:onload01.jpg]] | ||
+ | |||
The script above will load the values in the set commands when the bot is loaded. | The script above will load the values in the set commands when the bot is loaded. |
Latest revision as of 17:12, 17 September 2013
This command is a Flow Command. Commands inside of this command will run when the bot is loaded or the tab is loaded.
It is recommended for loading variables and setting values when a bot is opened or a tab is loaded.
It is not recommended for running full navigating scripts as soon as the bot loads. Doing so will cause the bot to freeze until all commands are run.
Event Type: The event type determines what event will trigger the containing commands to run. The options are:
- Bot Loaded: The commands within the command are run when the bot is loaded
- Tab Loaded: The commands within the command are run when the tab is loaded
[edit] Example
on load("Tab Loaded") { set(#one, 1, "Global") set(#two, 2, "Global") set(#three, 3, "Global") } ui stat monitor("Numbers", "{#one}{#two}{#three}")
The script above will load the values within the set commands when the tab is loaded.
on load("Bot Loaded") { set(#one, 1, "Global") set(#two, 2, "Global") set(#three, 3, "Global") } ui stat monitor("Numbers", "{#one}{#two}{#three}")
The script above will load the values in the set commands when the bot is loaded.