Triggers

Triggers are the code that make a script go. They catch some event on your computer and then run the code you tell them to run. The 'Trigger' window works the same way the 'Block' window does. You can use it to drag and drop triggers into your script. Clicking on a trigger in the list will give you an idea of what that trigger does. When you drag an drop the trigger into your script you will be prompted for the information needed for the trigger to decide when it should fire and what it should run when it does.

Every trigger has a 'Code to Run' property that will ask you what to run. If you don't change it, the trigger will create a new function in the JavaScript that will be run when the trigger activates. Inside that function will be a '#user Place Your Code Here' section where you can add your code. As long as you add your code in that section, if you edit the trigger later using the gray square, when the trigger is regenerated your code will be preserved. You can also use the drop down arrow on that property to choose an existing function in your script to run. Choosing <New Function...> will let you define a new function that will get called, and choosing <Script...> will let you pick an entire script that will be run.

Next Classes