On Load

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 6: Line 6:
 
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.
 
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.
  
The command comes with two options:
 
  
Bot Loaded: The commands within the command are run when the bot is loaded
+
'''Event Type:''' The event type determines what event will trigger the containing commands to run. The options are:
Tab Loaded: The commands within the command are run when the tab is loaded
+
 
 +
*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 ==

Revision as of 16:04, 24 April 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


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.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox