On Load

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Example)
 
(3 intermediate revisions by one user not shown)
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 ==
Line 21: 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 33: 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}")

Onload00.jpg


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}")

Onload01.jpg


The script above will load the values in the set commands when the bot is loaded.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox