General Information - General Functions S-Z - Flow Control Functions
General Functions A-R

Functions
ActivateWindowWithClass IsKeyDown
ActivateWindowWithIdentifier IsVariable
ActivateWindowWithTitle KeySequence
AddToVariable LoadSystemVariables
Beep MacroMachineIsRunning
BlockInput MacroMachinePopupMenu
Calculate MacroMachineQuit
Call MacroMachineStart
CallScript MarkActiveWindow
CallURL
Menu
ChangeWindow MouseButton
ConvertVariableToNumber MouseMove
ConvertVariableToReal MouseSequence
ConvertVariableToText MouseWheel
CopyFile MoveFile
CountFiles MultiplyVariable
CreateFolder PrintDebug
DeleteFile Prompt
DevideVariable RegGetValue
EnsureWindowWithIdentifier RegSetValue
Execute RenameFile
ExecuteAndWaitForWindow ResetInternet
FindChild RSIShieldIsPause
FindWindow RSIShieldIsRunning
FocusWindow RSIShieldPopupMenu
GetActiveWindowClass RSIShieldQuit
GetActiveWindowIdentifier RSIShieldStart
GetActiveWindowTitle SendKeys
GetCursorPos SendKeysAndWaitForWindow
GetGlobalValue SendMail
GetRSIShieldValue SetGlobalValue
GetStatusbarText SetRSIShieldValue
GetTickCount SetSendKeysSimulationSpeed
GetWindow SetSequenceSpeed
GetWindowClass SetVariable
GetWindowRect ShowRectangle
GetWindowText ShowRunTimeErrors
I_BrowserGetTitle Stop
I_BrowserGetURL StopInternet
I_BrowserIsBusy StopOnFailure
I_BrowserNavigate StrDelete
I_Connect StrFind
I_Disconnect StrFromAscii
I_ElementClick StrFromClipboard
I_ElementFocus StrFromFile
I_ElementGetChecked StrGetValue
I_ElementGetHTML StrHash
I_ElementGetInfo StrHexToFile
I_ElementGetPos StrInsert
I_ElementGetRect StrLeft
I_ElementGetRecurrenceIndex StrLength
I_ElementScrollIntoView StrLower
I_ElementSelect StrMid
I_ElementSetChecked StrNameFormat
I_ElementSetValue StrReplace
I_FindDocumentFromPoint StrRight
I_FindElement StrToAscii
I_FindElementFromPoint StrToClipboard
I_GetActiveDocument StrToFile
I_GetDocumentCount StrTrim
I_Parse StrUpper
I_SetActiveDocument SynchFiles
I_WaitForComplete TimeoutPrompt
I_WaitForElement Unzip
I_WaitForInteractive Wait
Input WaitForInternet
Internet WaitForWindow
IsActiveWindow Zip
* Newly added command since last version

ActivateWindowWithClass(text ClassName)

This function has one required parameter:
text
ClassName: The name (or a part of it) of the class of a window.

You can activate a window with a certain class to, for example, make sure the macro is executed in the correct application. A class-name is an invisible name that identifies a certain type of window. Every window in Windows as such a class-name. You can determine the class-name of a window by using the Tronan Spy tool in the Tronan Macro Editor.
You can provide the exact class-name of a window (Example 1), or you can provide part of the class-name of a window by using "*" signs (Example 2).

Power Tip: You can also use regular expressions with this function. All you have to do is put the indicator 'REGEXPR:' in front of the one of the search parameters. Click here for some examples.

 

Example 1:
// A window with the exact class-name "Notepad" is activated.
ActivateWindowWithClass("Notepad")

Example 2:
// A window of which the class-name ends with 'otepad' is activated.
ActivateWindowWithClass("*otepad")

ActivateWindowWithIdentifier(text/number Identifier)

This function has one required parameter:
text/number Identifier: The identifier of a window

This function activates a window with a certain identifier. Every window in Windows has such an identifier. An identifier is a number that uniquely identifies a window. The identifier is only valid for the duration of the live-span of the window. Once the window is destroyed, the identifier becomes invalid.

Example:
ExecuteAndWaitForWindow("notepad.exe")
GetActiveWindowIdentifier("
notepad_id")
// Do something else...

// Activate the notepad again
ActivateWindowWithIdentifier("%notepad_id%")

ActivateWindowWithTitle(text WindowTitle)

The function ActivateWindowWithTitle has one required parameter:
text WindowTitle: Title of a window, or part of the title of a window.

You can activate a window with a certain title to, for example, make sure the macro is executed in the correct application.
You can provide the exact title of a window (Example 1), or you can provide part of the title of a window by using "*" signs (Example 2).
Providing part of a window title can be useful when, for example, the window title reflects a document name, so you don't know the exact window title.

NOTE: you can also add another dependency, namely the class name. You can add this by putting the class name in front of the window title and separate the two by the == symbol (two equal signs).

Power Tip: You can also use regular expressions with this function. All you have to do is put the indicator 'REGEXPR:' in front of the one of the search parameters. Click here for some examples.

Example 1:
// A window with the exact title "RSI-Shield Settings Program" is activated.
ActivateWindowWithTitle("RSI-Shield Settings Program")

Example 2:
// A window is activated with "Microsoft Word" somewhere in the title, regardless of the document name which is displayed in the title.
ActivateWindowWithTitle("*Microsoft Word*")

Example 3:
// The calculator is activated, using the class name, and the title.
ActivateWindowWithTitle("SciCalc==Calculator")

AddToVariable(text VariableName, text/number/real Value)

The function AddToVariable has two required parameters:
text VariableName: Name of an existing variable.
text/number/real Value: Value to add to the value of the variable.

You can add a certain value to the value of an existing variable by using this function.
This way, you can add numbers to value's of existing variables or subtract them (Example 1).
Also, you can combine strings (Example 2) or add the value of a variable to the value of another variable (Example 3).

Remember that the type of the added value is automatically converted to the type of variable. So, if the variable is of the type "text", the value is also converted to the type "text" (Example 4). For more information about the "text/number/real" types, look at the general information.

Before using this function, you should use SetVariable to declare the variable.

Example 1:
// Let's say the value of the variable "counter" is 1. The number 2 is added to the value of the variable "counter" (1 in this case).
// So, the new value of the variable "counter" is 3. If you want to subtract, just add a negative number.
SetVariable("counter", 1)
AddToVariable("
counter", 2)

Example 2:
// The variable "name" has the value "John". The sir name "Doe" is added to the "name" variable.
// So, the new value of the variable "name" is "JohnDoe".

SetVariable("
name", "John")
AddToVariable("
name", "Doe")


Example 3:
// The variable "name" has the value "John". The variable "sirname" has the value "Doe". The value of the variable "name"
// is added to the value of the variable "sirname". So, the new value of the variable "name" is "JohnDoe".
SetVariable("name", "John")
SetVariable("
sirname", "Doe")
AddToVariable("
name", "%sirname%")

Example 4:
// The variable "name" has the value "John" and is of the "text" type. The value which is added to the "name" variable,
// is 12 and is of the "number" type. The value 12 is converted to the type "text", because the variable "name" is of the type "text".
// So, the new value of the variable "name" is "John12" and is of the "text" type.
SetVariable("name", "John")
AddToVariable("
name", 12)

Beep(text/number SoundFrequency, text/number SoundDuration)

The function Beep has two required parameters:
text/number SoundFrequency: Windows NT/ 2000: [in] Specifies the frequency, in hertz, of the sound. This parameter must be in the range 37 through 32,767 (0x25 through 0x7FFF).
text/number SoundDuration: Windows NT/ 2000: [in] Specifies the duration, in milliseconds, of the sound.

The Beep function generates simple tones on the speaker. The function is synchronous; it does not return control to its caller until the sound finishes. The function Beep can be useful when you want to give audio feedback, for example, when a macro has been fully executed or to draw the attention of a user when a prompt is displayed.

NOTE: On Windows 95 the Beep function ignores the dwFreq and dwDuration parameters. On computers with a sound card, the function plays the default sound event. On computers without a sound card, the function plays the standard system beep.

Example:
// Make a beeping sound
Beep(1000, 100)

BlockInput(text/number BlockEnabled)

The function BlockInput has one required parameter:
text/number BlockEnabled: Indicates whether or not the input should be blocked (0 = don't block, 1 = block)

Use the function BlockInput when you want to block all user input. One does not need to explicitly call BlockInput(0) at the end of the script (it is called implicitly).

Example:
// Block all user input
BlockInput(1)
SendKeys("
A user can not enter anything when this is being entered by the script.")

Calculate(text VariableName, text Formula, text/number ReturnResultAsInteger = 0 )

This function has two required parameters, and one optional parameter:
text VariableName: The name of the variable to store the result into.
text Formula: Formula you'd like the result of.
text/number ReturnResultAsInteger: Specifies the result type (double or integer).

This function can be used to calculate the result of a formula.

Example:
// Calculate 12 MODULES 5
Calculate("result", "((1+2)*4) % ((2*5)/2)", 1)

// Calculate the Square Root of 9 times the Sinus of 3
Calculate("result", "SQRT(9) * SIN(3)")

Call(text Application, text Parameters = "", text StartupDirectory = "", text/number MaxWaitInMilliSeconds = 30000)

The function Call has one required and 3 optional parameters:
text Application: The name of an application
text Parameters: The command line that should be passed to the application
text StartupDirectory: The folder from which the application should be executed
text/number MaxWaitInMilliSeconds: The maximum time the macro should wait for the application to finish

This function can be used to execute an application. The diffence between this function and the function Execute, is that this function waits for the application to finish. Furthermore, you can NOT start linked file-types with this command. So you can NOT start a word document just by executing the document-file itself. Use the Execute command for that.

Example:
// The following macro starts the Windows notepad and waits for it to finish
LoadSystemVariables()
Call("notepad.exe", "", "%FOLDER_WINDOWS%", 45000)
Prompt("
Notepad was closed")

CallScript(text ScriptName, text Password = "")

This function has one required parameter:
text ScriptName: The name of the script to execute (you must not add the .tma extension)
text Password: If the script you call is protected by a password, you can provide that password here

This function can be used to execute another script from within a script. You can test if the called script ran correctly. The result will be 1 if it was successful and 0 if it was not.

Example:
// We want to handle the errors ourself
StopOnFailure(0)
// Execute the system macro: '&Open Macros Folder'
CallScript("&Open Macros Folder")
if_failed()

  // Something went wrong so we stop the script
Stop()
end()
// Do something else (the CallScript function did OK)...

CallURL(text URL, text VariableName)

This function has two required parameters:
text URL: The URL you like to call
text VariableName: The name of the variable that can be used to store the result returned by the internet server

This function can be used to call a certain URL on the internet and obtain the result that the server sends back. This function is different from the other internet functions
because it will execute invisible. This way you can also examine the contents of an Internet page without opening the browser.

Example:
// Let's check the latest version of MacroMachine
CallURL("http://www.tronan.com/macromachine.version", "latest_version")
Prompt("%latest_version%")

ChangeWindow(text Action, text WindowTitle = "", text/number Value1 = 0, text/number Value2 = 0)

This function has one required and 3 optional parameters:
text Action: The action that should be performed on the window
text WindowTitle: The title (or a part of the title, using the * symbol) of a window. When no title is provided, the currently active window is used.
text/number Value1: The first value to be used with the Action parameter (only applicable for the types SET_POSITION and SET_SIZE)
text/number Value2: The second value to be used with the Action parameter (only applicable for the types SET_POSITION and SET_SIZE)

Action Value1 Value2 Description
MAXIMIZE     Maximizes the window
MINIMIZE     Minimizes the window
RESTORE     Restores the window to its previous size
NORMAL     Shows the window in its normal state
HIDE     Hides the window
CLOSE     Closes the window
       
SET_POSITION x coordinate y coordinate Changes the position of the window
SET_FOREGROUND     Makes the window the foreground window
SET_STAYONTOP     Makes the window stay on top (even if it becomes inactive)
SET_SIZE width in pixels

height in pixels

Changes the size of the window
SET_CENTER     Places the window in the center of the screen

Use this function to change a window. You can resize a window, close it, hide it, and much more. You can also combine actions in one call.

Power Tip: You can also use regular expressions with this function. All you have to do is put the indicator 'REGEXPR:' in front of the one of the search parameters. Click here for some examples.

Example:
// Execute notepad, resize it to 250x250 and then center it
ExecuteAndWaitForWindow("notepad.exe")
ChangeWindow("
SET_SIZE|SET_CENTER", "", 250, 250)

ConvertVariableToNumber(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable to convert to a number-variable-type

Use this function to convert a variable that has a certain type, to a number-type.

Example:
// Initialize the house number with the text 10
SetVariable("house_number", "10")
// Convert the house number to a number, so you can calculate with it
ConvertVariableToNumber("
house_number")
// Calculate the neighbours house number
AddToVariable("
house_number", 2)
// Show the result
Prompt("
The neighbours of number 10 live at number %house_number%")

ConvertVariableToReal(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable to convert to a real-variable-type

Use this function to convert a variable that has a certain type, to a real-type.

Example:
// Initialize the body length with the text 180.25 cm
SetVariable("body_length", "180.25 cm")
// Convert the body length to a real-number, so you can calculate with it
ConvertVariableToReal("
body_length")
// Calculate the height of the fence
MultiplyVariable("
body_length", 2)
// Show the result
Prompt("
The fence is twice as high as I am, so it is %body_length% cm")

ConvertVariableToText(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable to convert to a text-variable-type

Use this function to convert a variable that has a certain type, to a text-type.

Example:
// Initialize name with the text-value John
SetVariable("message", "John is ")
// Initialize the age with the number-value 21
SetVariable("age", 21)
// Convert the age to a text-type, so we can append it
ConvertVariableToText("
age")
// Append the age-text to the message-text
AddToVariable("
message", "%age%")
// Show the result (John is 21)
Prompt("
%message%")

CopyFile(text SourcePath, text DestinationPath, text/1/0 StopIfCopyFails = 0)

This function has two required parameters, and one optional parameter:
text SourcePath: The path of the source (you can use wildcards)
text DestinationPath: The path of the destination
text/1/0 StopIfCopyFails: flag to indicate whether the command should be considered failed if one of the copies did not succeed

Use this function to copy some files from one location to another.

Example:

// Copy all *.txt files from the C:\Source folder to the C:\Dest folder
// If one of them fails to copy, we just ignore it
CopyFile("C:\Source\*.txt", "C:\Dest\")

// Do not stop the macro if one of the commands fails
StopOnFailure(0)

// Copy readme.txt from C:\Source to C:\Dest, while renaming it to already read.txt
// The command should not ignore failures
CopyFile("
C:\Source\readme.txt", "C:\Dest\already read.txt", 1)

// Check if the copy command failed
if_failed()

 

Prompt("Could not copy the file")
end()

CountFiles(text VariableName, text SearchPath)

This function has two required parameters
text VariableName: The name of the variable to store the number of files counted into.
text SearchPath: The path to search in (you can use wildcards)

Use this function to count the number of files in a certain directory.

Example:

// Count the number of text files in to root
CountFiles("count", "C:\*.txt")

// Show us how many there are
Prompt("There are %count% text files in the root")

CreateFolder(text FolderPath)

This function has one required parameter:
text FolderPath: The path of the folder that should be created

Use this function to create a folder. It works recursively. So if you provide the path C:\Temp1\Temp2\Temp3 all three folders are created if they do not exist already.

Example:
// Lets create a folder (if the folders C:\Temp1 and C:\Temp1\Temp2 do not exist, they are created first)
CreateFolder("C:\Temp1\Temp2\Temp3")

DeleteFile(text Path, text/1/0 StopIfDeleteFails = 0)

This function has one required parameter, and one optional parameter:
text Path: The path of the files to delete (you can use wildcards)
text/1/0 StopIfDeleteFails: flag to indicate whether the command should be considered failed if one of the files could not be deleted

Use this function to delete some files.

Example:

// Delete all *.txt files from the C:\Temp folder
// If one of them fails to delete, we just ignore it
DeleteFile("C:\Temp\*.txt")

// Do not stop the macro if one of the commands fails
StopOnFailure(0)

// Delete readme.txt from C:\Temp
// The command should not ignore failures
DeleteFile("
C:\Temp\readme.txt", 1)

// Check if the delete command failed
if_failed()

 

Prompt("Could not delete the file")
end()

DevideVariable(text VariableName, text/number/real Value)

The function DevideVariable has two required parameters:
text VariableName: Name of an existing variable.
text/number/real Value: Value to add to the value of the variable.

With this function you can devide the value of a variable by another value.

Remember that the type of the variable is automatically converted to the type real. So, if the variable is of the type "text", it will be of the type real after deviding. For more information about the "text/number/real" types, look at the general information.

Before using this function, you should use SetVariable to declare the variable.

Example:
// Let's determine how many euros is the same as 10 guilders
SetVariable("Guilders", 10)
SetVariable("
Euros", "%Guilders%")
DevideVariable("
Euros", 2.20371)
Prompt("%Guilders% guilders amounts to %Euros% euros")

EnsureWindowWithIdentifier(text/number Identifier = 0)

This function has one required parameter:
text/number Identifier: The identifier of a window

This function activates a window with a certain identifier and guaranties that the script will stop as soon as this window is not the foreground window anymore. You can stop this enforcement by calling this function without parameters. If you do not, it will be enforced for the duration of the entire script.

If you have used this function to ensure a certain window, every function in the script (following this function) checks if that window is in the foreground, if it is not it will be put to the foreground. If the window does not exist anymore, the script will stop. Input functions like 'SendKeys', 'KeySequence', 'MouseMove' etc. even check this before each key-press or mouse-movement.

Every window in Windows has such an identifier. An identifier is a number that uniquely identifies a window. The identifier is only valid for the duration of the live-span of the window. Once the window is destroyed, the identifier becomes invalid.

Example:
ExecuteAndWaitForWindow("notepad.exe")
GetActiveWindowIdentifier("
notepad_id")
EnsureWindowWithIdentifier("%notepad_id%")
// Do something else...

// This will activate the notepad again, and the text will only be entered if it is in the foreground
SendKeys("This text will only be entered into the notepad.")

Execute(text FilePath, text Parameters = "", text StartupDirectory = "")

This function has one required and two optional parameters:
text FilePath: The name of file
text Parameters: The command line that should be passed to the application
text StartupDirectory: The folder from which the application should be executed

This function can be used to execute an application or to launch a document. The diffence between this function and the function Call, is that this function does not wait for the application to finish. Furthermore, you can start linked file-types. So you can start a word document just by executing the document-file itself.

Example:
// The following macro starts the Windows notepad and waits for it to finish
LoadSystemVariables()
Execute("notepad.exe", "", "%FOLDER_WINDOWS%")

// Start a word document
Execute("
letter.doc", "", "%FOLDER_MYDOCUMENTS%")

ExecuteAndWaitForWindow(text FilePath, text Parameters = "", text StartupDirectory = "", text/number MaxWaitInMilliSeconds = 30000)

This function is the same as the function Execute, but it has an additional parameter:
text/number MaxWaitInMilliSeconds: The maximum number of miliseconds to wait for a new window to appear

Use this function to execute an application or document, just like you would use the Execute command. This command, however, waits until a new window appears. A new window has appeared if the foreground window has changed since the beginning of the script, or since the last MarkActiveWindow command, or since the last ...WaitForWindow.. variant command.
This command implicitly calls MarkActiveWindow.

Example:
// Start the calculator and wait for it to show up
ExecuteAndWaitForWindow("calc.exe")
// Do some calculations
SendKeys("1+5[ENTER]")

FindChild(text/number WindowIdentifierParent, text Class, text Title, text VariableName = "wndID")

This function has three required parameter, and one optional:
text WindowIdentifierParent: The identifier of the window in which the search has to be made.
text
Class : The class name of the window to search for (if no class name is provided, only the the Title parameter will be used)
text Title : The title of the window to search for (if no title is provided, only the the Class parameter will be used)
text VariableName: The name of the variable to store the identifier of the found window in.

Use this function to find a child window or control with a certain class name and/or title. If the window or control is found, the identifier will be returned.

Example:
// Find a notepad window, and store the identifier
FindWindow("NOTEPAD", "")

// Find the edit control within Notepad
FindChild("
%wndID%", "Edit", "")

// Get the text of Notepad
GetWindowText("
%wndID%")

// Display the contents of Notepad
Prompt("
Notepad contains this text:\
\
%wndText%
")

FindWindow(text Class, text Title, text VariableName = "wndID")

This function has two required parameter, and one optional:
text Class : The class name of the window to search for (if no class name is provided, only the the Title parameter will be used)
text Title : The title of the window to search for (if no title is provided, only the the Class parameter will be used)
text VariableName: The name of the variable to store the identifier of the found window in.

Use this function to find a window with a certain class name and/or title. If the window is found, the identifier of that window will be returned.
This function always uses regular expressions (click here).

Example:
// Find a notepad window, and store the identifier
FindWindow("NOTEPAD", "")

// Activate notepad
ActivateWindowWithIdentifier("
%wndID%")

FocusWindow(text WindowIdentifier, text UseMouseClick = "0")

This function has one required parameter, and one optional:
text WindowIdentifier: The identifier of the window that has to get the focus.
text UseMouseClick: Specifies if a left mouse click should used on the control, after the focus has been set.

Use this function to put the focus on (i.e. activate) a certain window or control, and thus making it available for input. One can also specify to use a left mouse click (for instance, to press a button).

Example:
// Start Notepad
ExecuteAndWaitForWindow("
Notepad.exe")

// Put some text in there, and open the Find box
SendKeysAndWaitForWindow("Some text...[CTRL]f")

// Get the identifier of the Find box
GetActiveWindowIdentifier("wndID")

// Look for the "Match case" option (which is the fourth child of the box)
GetWindow("%wndID%", "1.4")

// Put the focus on the "Match case" option
FocusWindow("%wndID%")

// Toggle "Match case" on, using the spacebar
SendKeys("
[SPACE]")

GetActiveWindowClass(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable that can be used to store the class-name in

Use this function to determine the class-name of the currently active window. Every window in Windows has such an class-name. A class specifies what kind of window the window is.

Example:
ExecuteAndWaitForWindow("notepad.exe")
GetActiveWindowClass("
notepad_class")
// Do something else...

// Activate the notepad again
Prompt("%notepad_class%")

GetActiveWindowIdentifier(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable that can be used to store the identifier in

Use this function to determine the unique identifier of the currently active window. Every window in Windows has such an identifier. An identifier is a number that uniquely identifies a window. The identifier is only valid for the duration of the live-span of the window. Once the window is destroyed, the identifier becomes invalid.

Example:
ExecuteAndWaitForWindow("notepad.exe")
GetActiveWindowIdentifier("
notepad_id")
// Do something else...

// Activate the notepad again
ActivateWindowWithIdentifier("%notepad_id%")

GetActiveWindowTitle(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable that can be used to store the class-name in

Use this function to determine the title of the currently active window. Every window in Windows has such an title (caption).

Example:
ExecuteAndWaitForWindow("notepad.exe")
GetActiveWindowTitle("
notepad_title")
// Do something else...

// Activate the notepad again
Prompt("%notepad_title%")

GetCursorPos(text VariableNamePosX, text VariableNamePosY)

This function has two required parameters:
text VariableNamePosX: The name of the variable that can be used to store the X coordinate
text VariableNamePosY: The name of the variable that can be used to store the Y coordinate

Use this function to determine the position (coordinates) of the cursor (mouse arrow). The coordinates returned, will be relative to the entire screen.

Example:

// Repeat forever
repeat(-1)

// Get the cursor position
GetCursorPos("
x", "y")

// Show it for a second
TimeoutPrompt("
X:%x%, Y:%y%", "Tronan Macro", 0, 1000)

// Stop if the OK button gets pressed

if ("last_result", "=", 1) repeat_stop() end()

end()

GetGlobalValue(text VariableName, text ValueName)

This function has two required parameters:
text VariableName: The name of the variable to store the result in
text ValueName: The name of the Global Value one wants to retrieve

This function is used to retrieve a Global Value. Global Values can be used to pass data between different Macro Scripts.

Example:
// Call a script to get the name of the user
CallScript("getname")
GetGlobalValue("
globalVal", "FirstName")
IsVariable("
globalVal")
if_succeeded()

 

// This prompt will display the first name
Prompt("The first name is: %globalVal%")

end()

GetRSIShieldValue(text VariableName, text ValueName)

This function has two required parameters:
text VariableName: The name of the variable that can be used to store the class-name in
text ValueName: The name of the value you want to query from RSI-Shield

Value Name Description
auto_mouse_click_enabled Determine if the auto mouse click function is enabled.
auto_snooze_enabled Determine if the auto-snooze (when using a modem) function is enabled.
break_warning_time
Determine the time (in seconds) before a break when the break-notification will be shown.
break_warning_enabled
Determine whether or not a notification will be shown before a break starts.
consider_natural_breaks
Determine whether or not the RSI-Shield intelligence considers the breaks users take naturally.
consider_user_input
Determine whether or not RSI-Shield stops counting down (the counter) when a user does not use the PC.
countdown_on_user_input Determine how many seconds are counted down when a user uses the computer briefly.
current_profile
Determine the name of the currently active user profile.
days_since_installation
Determine how many days ago RSI-Shield was installed.
disable_keyboard_during_break
Determine whether or not RSI-Shield blocks keyboard input during a break.
disable_mouse_during_break
Determine whether or not RSI-Shield blocks mouse input during a break.
empty_macro_hotkey_pos
Find a free position for a new hotkey for a macro (0-74).
empty_trigger_pos
Find a free position for a new trigger (activation sequence) for a macro (0-74).
hours_visible
Determine whether or not the hours are shown in the counter (in the system tray).
in_active_period
Determine whether RSI-Shield is currently in an active period (i.e. when not in a break).
is_network_version
Determine if RSI-Shield is running as a network version (or stand-alone version).
key_sound
Determine the name of the sound that will be played when a user hits a key (will be empty if no sound is selected).
keyboard_2_mouse_translator_enabled Determine if the 'keyboard 2 mouse translator' is enabled. When it is, one can control the mouse with the keyboard.
keyboard_currently_disabled
Determine if the keyboard is currently being blocked (only possible during breaks).
macro_hotkey([i]Index, [o]VirtualKey, [o]Modifiers, [o]Path)


Determine which macro, can be activated with which key combination at a certain index (Index = a number between 0 and 74). (Click here for VirtualKey ,Modifiers). Path = the path of the found macro (relative to the Macros root-folder). (Auto-variable-prefix = MH_).

macro_hotkey_by_name([i]MacroName, [o]VirtualKey, [o]Modifiers, [o]Index)

Determine which key combination activates a certain macro, and at which index the macro-hotkey is located (Index = a number between 0 and 74). MacroName = the path of the macro relative to the Macros root-folder (e.g. 'My Macros\\Quick.tma'). (Click here for VirtualKey ,Modifiers). (Auto-variable-prefix = MHBN_).

macro_trigger([i]Index, [o]Sequence, [o]Path)
Determine which macro, can be activated with which sequence of characters, at a certain index (Index = a number between 0 and 74). Path = the path of the found macro (relative to the Macros root-folder). (Auto-variable-prefix = MT_).
max_exercises
Determine the maximum number of exercises that will be played during a break.
max_snooze_count
Determine the maximum number of times one can postpone a break.
max_snooze_time
Determine how many seconds a snooze-action will jump back in time (will only work if the max_snooze_time_enabled value is set, so first query that value).
max_snooze_time_enabled
Determine whether or not the maximum snooze time is overridden by the user. If the value is 0, postponing a break will give the maximum amount to work. If the value is 1, the max_snooze_time value specifies how many seconds of working time one will regain.
minutes_visible
Determine whether or not the minutes are shown in the counter (in the system tray).
mouse_currently_disabled
Determine if the mouse is currently disabled.
natural_break_multiplier([i]BreakIndex)
Determine which multiple of the length of the corresponding break type, is considered to be a natural break. e.g. If the length of a micro break is 60 seconds, and the 'natural break multiplier' is 2, then one should not touch the PC for 120 seconds, to make RSI-Shield treat the break as a valid natural break.
network_ok
Determine if the network is ok, will only work if RSI-Shield is installed as a network version.
no_discipline_mode_enabled
Determine if the no-discipline mode is enabled.
pause
Determine if RSI-Shield is currently in a break.
profile_folder Determine the folder in which RSI-Shield keeps its profiles.
ras_connected
Determine if RAS is connected i.e. a modem is being used.
ras_installed
Determine if RAS is installed i.e. Dialup connection via a modem.
registered
Determine if RSI-Shield is successfully registered (only for non-network versions).
registration_code
Determine the registration code (only if RSI-Shield is registered).
registration_username
Determine the user name with which RSI-Shield is registered (if at all).
seconds_since_creation Determine how long RSI-Shield has been running this day.
seconds_sincelast_input
Determine how long the computer has not been used by a person.
seconds_till_break([i]BreakIndex)
Determine how many seconds it will take to get the next break of a specified type (BreakIndex).
show_exercises_during_break([i]BreakIndex)
Determine if exercises will be shown during a specific type of break (BreakIndex).
skin
Determine the name of the skin (the appearance of the counter) that is currently used.
snooze_count
Determine how many times the upcoming break has already been postponed.
snooze_key_combination([o]ModifierKeys)
Determine the key combination that can be used to postpone breaks. The returned value specifies the virtual key code. And the output variable will receive the modifier keys. (Click here for VirtualKey ,Modifiers). (Auto-variable-prefix = SKC_).
snooze_notification_animation Determine whether or not a notification movie will be played when a break is postponed.
sound_enabled
Determine if sounds are enabled. If so, sounds will be played to notify users of events (beginning of a break etc.)
statistics_number_of_days
Determine how many days are logged in the statistics-log.
statistics_of_day([i]Password, [i]DayIndex, [i]KeyOfInterest, [o]Year, [o]Month, [o]Day, [o]SecondsSinceCreation, [o]TotalSnoozeCount, [o]NaturalBreaks1Taken, [o]NaturalBreaks2Taken, [o]NaturalBreaks3Taken, [o]NaturalBreaksTakenInSeconds, [o]ForcedBreaks1Taken, [o]ForcedBreaks2Taken, [o]ForcedBreaks3Taken, [o]ForcedBreaksTakenInSeconds, [o]RunningInActivePeriodInSeconds, [o]TotalNumberKeyHits, [o]TotalNumberOfMouseButtonHits, [o]MouseDistanceInMeters, [o]KeyHits, [o]LeftButtonClicks, [o]LeftButtonDblClicks, [o]MiddleButtonClicks, [o]MiddleButtonDblClicks, [o]RightButtonClicks, [o]RightButtonDblClicks)

Obtain the statistic-information that has been logged for a specific day. With DayIndex you can specify of which day you want the data. DayIndex begins at 1 and ends with 'statistics_number_of_days' (which is probably the current day). Furthermore you should provide a Password, if the user has protected his/her profile with one (otherwise just provide the word NONE). And if you are interested in how many times a specific key was pressed, you should provide the virtual key code; KeyOfInterest. (Click here for VirtualKey explanation). The KeyHits value will then be filled with the number of presses of that key. (Auto-variable-prefix = SOD_). (If the wrong password was provided, the return value will be: 'Wrong password')

system_id
Determine the system id of the PC.
timeline([o]SmallestActivePeriod, [o]SmallestBreakPeriod, [o]ActivePeriod2Multiplier, [o]BreakPeriod2, [o]ActivePeriod3Multiplier, [o]BreakPeriod3)

Determine the time line of RSI-Shield. This time line specifies exactly when a micro, medium, or macro break should be held. SmallestActivePeriod = The time one can work, SmallestBreakPeriod = The Micro break length (seconds), ActivePeriod2Multiplier = Every which time a Medium break will be held i.s.o. a Micro break, BreakPeriod2 = The Medium break length (seconds) etc. (Auto-variable-prefix = TL_).

timeline_period_info([i]Index, [o]Seconds, [o]Style, [o]From, [o]To)

Retrieve all information about a time line segment. Index = a segment index, beginning at zero, and ending at timeline_periods_count - 1. Seconds = Length of period, Style = Type of period (1 = Active period, 2 = micro, 3 = medium, 4 = macro break), From = The first second of the period, To = The last second of the period. (Auto-variable-prefix = TLPI_).

timeline_periods_count
Determine how many periods are on the time line.
timeline_position
Determine the current position (in seconds) of RSI-Shield on the time line.
trial_days_left
Determine how many trial days are left.
trigger_by_name([i]MacroName, [o]Sequence, [o]Index)

Determine which sequence of characters activates a certain macro, and at which index the sequence is located (Index = a number between 0 and 74). MacroName = the path of the macro relative to the Macros root-folder (e.g. 'My Macros\\Quick.tma'). (Auto-variable-prefix = TBN_).

twice_as_fast
Determine of RSI-Shield is currently counting down twice as fast (as normal). Because someone has postponed breaks earlier.

[i] = required value, as input
[o] = optional variable name, for output

You either provide all optional output variable names, or you provide none. If you provide none, the Macro will automatically generate the variables with the shown names, prefixed with the first letter of every word of the value name. e.g. macro_hotkey(1) will automatically create the variables MH_VirtualKey, MH_Modifiers, and MH_Path. Those variables will receive the values queried for.


Virtual Key Codes: A special code that identifies an actual key on the keyboard Click here for a table.

Modifiers: A key combination with one or more of these keys: Alt (1), Ctrl (2), Shift (4), Win (8). You just add the values together to create a combination (e.g. if Modifiers = 7, the keys Ctrl+Alt+Shift are all used).


BreakIndex: Some values require that you specify a break index. This means that the value is valid for a micro break, medium break, and macro break. So you have to specify via an index, in which one you are interested (1 = Micro break, 2 = Medium break, 3 = Macro break)

Use this function to get information from the RSI-Shield counter.

Example:
// Determine what skin RSI-Shield is using
GetRSIShieldValue("skin_name", "skin")
Prompt("
Skin: %skin_name%")

// Determine how many times the spacebar was pressed on the first day
GetRSIShieldValue("result", "statistics_of_day(NONE, 1, 32)")
Prompt("
Spacebar pressed on the first day: %SOD_KeyHits%")

// Determine what activate-sequence can be used for Quick.tma, and which index this sequence has
GetRSIShieldValue("
result", "trigger_by_name(My Macros\\Quick.tma, SequenceVar, IndexVar)")
Prompt("
Activate sequence, and index of macro 'Quick.tma': %SequenceVar%, %IndexVar%")

GetStatusbarText(text/number WindowIdentifierParent, text VariableName = "wndText")

This function has one required parameter, and one optional:
text WindowIdentifierParent: The identifier of the window one wants to get the statusbar text from.
text VariableName: The name of the variable to store the statusbar text in.

Use this function to retrieve the text of the status bar of a certain window. The text of the different panes are stored in an array like fashion within the variable (e.g. wndText.0 = pane 1, wndText.1 = pane 2 etc.) If one ommits to use the pane differentiator, the text of all the panes is returned (e.g. wndText = pane 1|pane 2 etc.)

Example:
// Start Internet Explorer
ExecuteAndWaitForWindow("
IExplore.exe")

// Get the identifier of the Find box
GetActiveWindowIdentifier("wndID")

// Connect to the Internet Explorer
I_Connect("%wndID%")

// Navigate it to the Tronan site
I_BrowserNavigate("http://www.tronan.com")

// Get the status text of the browser
GetStatusbarText("%wndID%", "status")

// Display the first pane of the status bar
Prompt("
%status.0%")

GetTickCount(text VariableName)

This function one required parameter:
text VariableName: The name of the variable that can be used to store the X coordinate

The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. It is limited to the resolution of the system timer. The elapsed time is stored as a DWORD value. Therefore, the time will wrap around to zero if the system is run continuously for 49.7 days. You can use this function to determine how long a certain task has run, or (if you don't call it at a regular frequency) you can use it to generate semi-random numbers.

Example:

// Determine the initial tick value
GetTickCount("
begin_tick")

// Show a message
Prompt("This macro measures, how long it takes for you to close this box.")

// Get the current tick value
GetTickCount("delta")

// Calculate the difference between the two tick values
AddToVariable("delta", "-%begin_tick%")

// Prompt the user with the result
Prompt("
It has taken you: %delta% milliseconds")

GetWindow(text/number WindowIdentifier, text/number SearchType, text VariableName = "wndID")

This function has two required parameter, and one optional:
text WindowIdentifier: The identifier of the window you want to start the search from
text SearchType: The way the search needs to be done. Can be one of the following options: next, prev, first, last, owner, parent, desktop, foreground, focus, or a search structure (e.g. 1.3.2.5)
text VariableName: The name of the variable to store the window identifier of the found window in

Use this function to search for a certain window, using another window as a start point. By using this function one can, for instance, enumerate through all child windows of a window. Especially the structure search method is pretty useful. This method can enumerate through the windows, using a search string, that specifies where the window can be found. E.g. "1.3.2" means, get the first child of the start window, from that point get the third child, and from that point get the second child. One can examine these structures of windows by using the TronanSpy (disable the Simple mode).

Example:
// Start Notepad
ExecuteAndWaitForWindow("
Notepad.exe")

// Put some text in there, and open the Find box
SendKeysAndWaitForWindow("Some text...[CTRL]f")

// Get the identifier of the Find box
GetActiveWindowIdentifier("wndID")

// Look for the "Match case" option (which is the fourth child of the box)
GetWindow("%wndID%", "1.4")

// Put the focus on the "Match case" option
FocusWindow("%wndID%")

// Toggle "Match case" on, using the spacebar
SendKeys("
[SPACE]")

GetWindowRect(text VariableName, text WindowIdentifier)

This function has two required parameters:
text VariableName: The name of the variable to use to store the rectangle coördinates in
text
WindowIdentifier: The identifier of the window one wants to get the coördinates of

Use this function to obtain the rectangle of a window. It returnes the absolute screen position of the window, plus the width, and the height. The variable has 4 properties: left, top, width, height

Example:
// Start the Calculator
ExecuteAndWaitForWindow("
Calc.exe")

// Get its identifier
GetActiveWindowIdentifier("wndID")

// Search for the 5 button
FindChild("%wndID%", "Button", "5")

// Retrieve its rectangle
GetWindowRect("rect", "%wndID%")

// Show the rectangle
ShowRectangle("%rect.left%", "%rect.top%", "%rect.width%", "%rect.height%")

// Allow the rectangle to stay visible for 2 seconds
Wait(2000)

GetWindowClass(text WindowIdentifier, text VariableName = "wndClass")

This function has one required parameter, and one optional:
text WindowIdentifier: The identifier of the window one wants to get the class name of
text VariableName: The name of the variable to store the class name of the found window in

Use this function to obtain the class name of a window.

Example:
// Find a calculator window, and store the identifier
FindWindow("", "Calculator")

// Get the class name of the found window
GetWindowClass("
%wndID%")

// Display the found class
Prompt("
%wndClass%")

GetWindowText(text WindowIdentifier, text VariableName = "wndText")

This function has two required parameter, and one optional:
text WindowIdentifier: The identifier of the window one wants to get the title of
text VariableName: The name of the variable to store the title of the found window in

Use this function to obtain the title of a window.

Example:
// Find a notepad window, and store the identifier
FindWindow("NOTEPAD", "")

// Get the title name of the found notepad window
GetWindowText("
%wndID%")

// Display the found title
Prompt("
%wndText%")

I_BrowserGetTitle(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable that can be used to store the browser title in

This function can be used to obtain the title of the browser.

Example:

// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")
// Wait until the browser has finished loading the page
I_WaitForComplete(
5000)
// Get the title of the browser
I_BrowserGetTitle("
title")
// Show the title
Prompt("
%title%")

I_BrowserGetURL(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable that can be used to store the browser 's URL in

This function can be used to obtain the URL of the browser.

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")
// Wait until the browser has finished loading the page
I_WaitForComplete(
5000)
// Get the URL of the browser
I_BrowserGetTitle("
url")
// Show the URL
Prompt("
%url%")

I_BrowserIsBusy(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable that can be used to store the browser title in

This function can be used to obtain the title of the browser.

Example:
// Start the Internet Explorer
ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")
// Determine if the browser is busy
I_BrowserIsBusy("busy")

// Prompt the busy state of the browser
if("%busy%=1")
Prompt("Browser is busy")
else()
Prompt("Browser is idle")
end()

I_BrowserNavigate(text URL)

This function has one required parameter:
text URL : The internet address to navigate the browser to

This function can be used to navigate the browser to a certain URL

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")

I_Connect(text/number BrowserWindowIdentifier = 0)

This function has one optional parameter:
text/number BrowserWindowIdentifier: The window identifier of the browser one wants to connect to. If one omits the identifier, this command will start a new instance of the Internet Explorer, and connects to it.

This function can be used to connect to a browser that one wants to control, or retrieve information from. This command HAS TE BE USED before any other Internet command.

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")

Example 2:
// Start the Internet Explorer, and connect to it

I_Connect(
0)
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")

I_Disconnect()

This function has no parameters:

This function can be used to disconnect from a browser. This is not a absolutely needed command. It only frees up some memory.

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")
// Disconnect from the browser
I_Disconnect()

I_ElementClick()

This function has no parameters:

This function can be used to call the DHTML method "Click" of the active element.

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")

// Wait for the page to complete loading (and parse it implicitly)

I_WaitForComplete(
10000, 0)

// Find the first link on the page, and make it the active element
I_FindElement("a")

// Call the link's DHTML Click method
I_ElementClick()

I_ElementFocus()

This function has no parameters:

This function can be used to call the DHTML method "Focus" of the active element. This will cause the next keyboard input to go to that element.

Click here for an Example

I_ElementGetChecked(text VariableName)

This function has one required parameter:

text VariableName: The name of the variable that can be used to store the checked status in

This function can be used to call the DHTML method "GetChecked" of the active element (a checkbox). This will return the checked status of the item.

Click here for an Example

I_ElementGetHTML(text VariableName)

This function has one required parameter:

text VariableName: The name of the variable that can be used to store the HTML text in

This function can be used to obtain the HTML code that makes up the active element. For instance if one makes a table the active element, one can use this function to retrieve all the HTML code that is contained within that table.

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")

// Wait for the page to complete loading (and parse it implicitly)

I_WaitForComplete(
10000, 0)

// // Find the HTML tag of the page (the html tags enclose the entire code of the page)
I_FindElement("html")

// Get the HTML code of the entire page
I_ElementGetHTML("html_text")

// Show the HTML code of the entire page
Prompt("%html_text%")

I_ElementGetInfo(text VariableName)

This function has one required parameter:

text VariableName: The name of the variable that can be used to store the element info in

This function can be used to obtain all sorts of informatin about the active element. The following DHTML properties are retrieved: index, tag, type, name, id, value, innerText, src, href

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")

// Wait for the page to complete loading (and parse it implicitly)

I_WaitForComplete(
10000, 0)

// Find the first link on the page, and make it the active element
I_FindElement("a")

// Get info about the link
I_ElementGetInfo("info")

// Show some info
Prompt("Index: %info.index%\
HRef: %info.href%
")

I_ElementGetPos(text VariableName)

This function has one required parameter:

text VariableName: The name of the variable that can be used to store the element info in

This function can be used to obtain the position of the active element. The position is not the index! It is the position in the list of elements with the same tag.

Example:
Click here for an Example

I_ElementGetRect(text VariableName)

This function has one required parameter:

text VariableName: The name of the variable that can be used to store the element info in

This function can be used to obtain the position of the active element. The position is not the index! It is the position in the list of elements with the same tag.

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")

// Wait for the page to complete loading (and parse it implicitly)

I_WaitForComplete(
10000, 0)

// Find the first link on the page, and make it the active element
I_FindElement("a")

// Get the bounding rectangle of the found element
I_ElementGetRect("rect")

// Make the found rectangle visible
ShowRectangle("%rect.left%", "%rect.top%", "%rect.width%", "%rect.height%")

// Allow the rectangle to stay visible for 2 seconds
Wait(
2000)

I_ElementGetRecurrenceIndex(text VariableName)

This function has one required parameter:

text VariableName: The name of the variable that can be used to store the recurrence index in

This function can be used to obtain recurrence index of the active element. The recurrence index defines the position of the active element within a list of elements with the exact same parameters that were used when one searched for the element. Some times an element cannot be uniquely identified by differentiating the different parameters. This function allows you to uniquely identify it anyhow. One can also use the index of the element (see I_ElementGetInfo), but when the target site is changed, this index will probably change too.

Example:
Click here for an Example

I_ElementScrollIntoView()

This function has no required parameters:

This function can be used to make sure that the active element is visible. One can also use I_ElementFocus.

Example:
Click here for an Example

I_ElementSelect()

This function has no required parameters:

This function can be used to call the DHTML method "Select" of the active element. This only works for elements with tags like: input, option, textarea, select

Example:
Click here for an Example

I_ElementSetChecked(text/1/0 Checked = 1)

This function has one optional parameter:

text/1/0 Checked : Specifies if the active element should be checked or unchecked. Works only on elements like checkboxes

This function can be used to set or remove a check mark in a check box.

Example:
Click here for an Example

I_ElementSetValue(text Value)

This function has one required parameter:

text Value: Specifies the value that should be passed on to the active element

This function can be used to set the DHTML property "value" of the active element. For instance, one can use this function to put some text in an textarea element.

Example:
Click here for an Example

I_FindDocumentFromPoint(text/number Left, text/number Top)

This function has two required parameters:

text/number Left: Specifies the left (x) coördinate of the point under which the document should be found
text/numberTop: Specifies the top (y) coördinate of the point under which the document should be found

This function can be used to search for a document (within a Frame/I-Frame) under a screen-point. When this function succeeds, it makes the found document the active one.

Example:
Click here for an Example

I_FindElement(text Tag, text Type = "", text Name = "", text Id = "", text Value = "", text InnerText = "", text Src = "", text HRef = "", number Index = -1, number RecurrenceIndex = -1)

This function has one required parameter:

text Tag: Specifies the tag of the element to search for. One can also use the text 'any' if the tag is not important
text Type: Specifies the type of the element to search for. If an empty string is provided this parameter is not used for the search.
text Name: Specifies the name of the element to search for. If an empty string is provided this parameter is not used for the search.
text
Id: Specifies the id of the element to search for. If an empty string is provided this parameter is not used for the search.
text Value: Specifies the value of the element to search for. If an empty string is provided this parameter is not used for the search.
text
InnerText: Specifies the innerText of the element to search for. If an empty string is provided this parameter is not used for the search.
text
Src: Specifies the src of the element to search for. If an empty string is provided this parameter is not used for the search.
text
HRef: Specifies the href of the element to search for. If an empty string is provided this parameter is not used for the search.
number
Index: Specifies the index of the element to search for. If -1 is provided this parameter is not used for the search.
number
RecurrenceIndex: Specifies the recurrence index of the element to search for. If -1 is provided this parameter is not used for the search.

This function can be used to search for a certain element within the active document (Frame or I-Frame). When the element is found, it is made the 'active' element.

Example:
Click here for an Example

I_FindElementFromPoint(text/number Document , text/number Left, text/number Top)

This function has three required parameters:

text/number Document: Specifies the document-number of the document (Frame or I-Frame), where to look in
text/number
Left: Specifies the left (x) coördinate of the point under which the element should be found
text/number Top: Specifies the top (y) coördinate of the point under which the element should be found

This function can be used to search for an element within a document (within a Frame/I-Frame) under a screen-point. When this function succeeds, it makes the found element the active one.

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")
// Navigate it to the Tronan site
I_BrowserNavigate("
http://www.tronan.com")

// Wait for the page to complete loading (and parse it implicitly)
I_WaitForComplete(10000, 0)

// Find the first link on the page
I_FindElement("a")

// Get the bounding rectangle of the found element
I_ElementGetRect("rect")

// Find the document under the left-upper corner of the link
I_FindDocumentFromPoint("%rect.left%", "%rect.top%")

// Get the number of the found document
I_GetActiveDocument("document")

// Find out which element is under the coördinates
I_FindElementFromPoint("%document%", "%rect.left%", "%rect.top%")

// Put the input focus on it
I_ElementFocus()

I_GetActiveDocument(text VariableName)

This function has one required parameter:

text VariableName: The name of the variable that can be used to store the active document number in

This function can be used to obtain the number of the active document (Frame or I-Frame).

Example:
Click here for an Example

I_GetDocumentCount(text VariableName)

This function has one required parameter:

text VariableName: The name of the variable that can be used to store the number of found documents in

This function can be used retrieve the number of documents (Frames or I-Frames).

Example:
Click here for an Example

I_Parse()

This function has no parameters:

This function can be used to parse the DHTML structure after connecting to a browser. This function should be called every time a page has changed. One can also use I_WaitForComplete, or I_WaitForInteractive which both implicitly call Parse after the page is ready.

Example:
// Start the Internet Explorer

ExecuteAndWaitForWindow("
IExplore.exe")
// Wait for the initial (home) page to load
Wait(
5000)
// Get its window handle
GetActiveWindowIdentifier("
wndID")
// Connect to the browser
I_Connect("
%wndID%")

// Parse the current page
I_Parse()

// Get the number of documents
I_GetDocumentCount("count")

// Display the number of documents
Prompt("Documents: %count%")

I_SetActiveDocument(text/number DocumentNumber)

This function has one required parameter:

text/number DocumentNumber: The number of the document (Frame or I-Frame) to activate

This function can be used to abstractly activate a certain document (Frame or I-Frame). It doesn't really activate it, it just sets an indicator in memory for other Internet script functions, so they 'know' which document to use.

Example:
Click here for an Example

I_WaitForComplete(text/number TimeoutSeconds, text/number Document = -1 )

This function has one required parameter, and one optional one:

text/number TimeoutSeconds: The maximum number of seconds to wait for a document to complete
text/number Document: The number of the document (Frame or I-Frame) to wait for. If one provides the value -1, the function waits for the entire browser to reach the complete status

This function can be used to wait for a certain document (Frame or I-Frame) to complete loading. After the document is successfully loaded, the functions I_Parse, and I_SetActiveDocument are called implicitly.

Example:
Click here for an Example

I_WaitForElement(text/number TimeoutSeconds, text Tag, text Type = "", text Name = "", text Id = "", text Value = "", text InnerText = "", text Src = "", text HRef = "", number Index = -1, number RecurrenceIndex = -1)

This function has the following parameters:

text/number TimeoutSeconds: Specifies the maximum number of seconds to wait for the element to become available
text Tag: Specifies the tag of the element to search for. One can also use the text 'any' if the tag is not important
text Type: Specifies the type of the element to search for. If an empty string is provided this parameter is not used for the search.
text Name: Specifies the name of the element to search for. If an empty string is provided this parameter is not used for the search.
text
Id: Specifies the id of the element to search for. If an empty string is provided this parameter is not used for the search.
text Value: Specifies the value of the element to search for. If an empty string is provided this parameter is not used for the search.
text
InnerText: Specifies the innerText of the element to search for. If an empty string is provided this parameter is not used for the search.
text
Src: Specifies the src of the element to search for. If an empty string is provided this parameter is not used for the search.
text
HRef: Specifies the href of the element to search for. If an empty string is provided this parameter is not used for the search.
number
Index: Specifies the index of the element to search for. If -1 is provided this parameter is not used for the search.
number
RecurrenceIndex: Specifies the recurrence index of the element to search for. If -1 is provided this parameter is not used for the search.

This function can be used to wait for a certain element within the active document (Frame or I-Frame) to become available. When the element is found, it is made the 'active' element.

Example:
Click here for an Example

I_WaitForInteractive(text/number TimeoutSeconds, text/number Document = -1 )

This function has one required parameter, and one optional one:

text/number TimeoutSeconds: The maximum number of seconds to wait for a document to become interactive
text/number Document: The number of the document (Frame or I-Frame) to wait for. If one provides the value -1, the function waits for the entire browser to reach the interactive status

This function can be used to wait for a certain document (Frame or I-Frame) to become interactive. After the document is successfully loaded enough, the functions I_Parse, and I_SetActiveDocument are called implicitly.

Example:
Click here for an Example

Input(text VariableName, text Message = "", text Title = "", text DefaultValue = "")

This function has one required and three optional parameters:
text VariableName: The name of the variable that can be used to store the entered data in
text Message: The message (question) that should be shown in the box
text Title: The title of the box
text DefaultValue: The default value

This function can be used to let a user enter in some data. The entered data is then stored into a variable (VariableName). So you can use the data in your script.

Example:
// Ask for someones' name
Input("name", "What is your name?")
// Greet him/her
Prompt("
Hi %name%, how are you?")

Internet(text InternetAddress = "http://www.tronan.com")

This function has one optional parameter:
text InternetAddress: The internet address (URL) the Tronan Browser has to navigate to

Use this function to open the Tronan Browser and to let it navigate to a certain URL. The Tronan Browser is a Internet browser that was developed especially for Tronan Macros. It enables you to query how many items it has loaded since it was started or since it was reset by the ResetInternet command. Normally it would be very difficult to create a macro for the Internet, since you can not predict how long it will take for a page to load. When you use the Tronan Browser and the WaitForInternet command, however, this is not a problem anymore.

Example:
// Open the Tronan Browser with the RSI-Shield URL
Internet("
http://www.rsishield.com")

// Wait for the RSI-Shield page to load
WaitForInternet(2)

// Select the download 'button' (the seventh element) on the page
SendKeys("[TAB:7]")

// Push the download button
SendKeys("
[ENTER]")

IsActiveWindow(text WindowTitle)

This function has one required parameter:
text WindowTitle: The title (or a part of the title using * symbols) that should be compared with that of the active window

Use this function to verify whether or not a certain window is in the foreground.

Power Tip: You can also use regular expressions with this function. All you have to do is put the indicator 'REGEXPR:' in front of the one of the search parameters. Click here for some examples.

Example:
// Check if the Windows notepad is in the foreground
IsActiveWindow("
*notepad*")
if_succeeded()
 

// The following text will only be entered if the notepad is active
SendKeys("This will be entered into notepad.")

end()

IsKeyDown(text VariableName, text/number VirtualKeyCode)

This function has two required parameters:
text VariableName: The name of a variable that can be used to store the result in (0 = key is not down, 1 = key is down, 2 = key is toggled on, 3 = key is down and toggled on)
text/number VirtualKeyCode:The Virtual Key Code of the key you are interested in (click here for a table of codes)

Use this function to determine if a key is being pressed or toggled. Keys like CapsLock can be toggled.

Example:

// Press the shift key to show the message, and escape to stop the script
repeat(-1) // Repeat forever
 

// Test if the shift key is down
IsKeyDown("shift_down", 16)
if_succeeded("shift_down")

    // If it is, we show a message
Prompt("Shift has been pressed")
 

end()

// Test if the escape key is pressed
IsKeyDown("escape_down", 27)
if_succeeded("escape_down")

    // If it is, we stop the script
repeat_stop()
 

end()

// Don't want to use up all of the processor-time
Wait(100)

end()

IsVariable(text VariableName)

This function has one required parameter:
text VariableName: The name of the variable one wants to test its existence of

This function is used to check whether a certain variable exists or not.

Example:
// Declare a variable
SetVariable("
firstname", "Pete")
IsVariable("
firstname")
if_succeeded()

 

// This prompt will apear
Prompt("The first name is known")

end()

IsVariable("lastname")
if_succeeded()

 

// This prompt will NOT apear
Prompt("The first name is NOT known")

end()

KeySequence(text KeyData)

This function has one required parameter:
text KeyData: The data to enter a series of keys (a repetition of the following format: "delaytime, keycode, action")

This function is mainly intended for playback of recorded macros. When a macro is recorded, this command with its KeyData is generated by the recording-tool. You can enter the data by hand, but you would be better of using the SendKeys command. The delaytime is the time in milliseconds the script should wait before the key is pressed or released. The keycode is the code of the key that should be pressed or released. The action specifies if the key should be pressed or released (0 = press and release, 1 = press, 2 = release).

Example:
// Enter the text: Hello
KeySequence("150,[SHIFT],1, 511,[H],0, 160,[SHIFT],2, 100,[E],0, 110,[L],0, 141,[L],0, 220,[O],0")

LoadSystemVariables()

This function has no parameters

Use this function to load a set of system variables. All system variables are of the type, text. You can not unload them later on. Once you have loaded these variables, you can use them to inject their values into a text argument, by putting the variable name between % symbols. N.B. These variables are not garanteed to be filled. You have to check using the if statement if it is. On Windows 95 some of these will not be filled, others will. On NT4.0 or higher they all will be filled. In the description in the table below, you will find absolute paths, that are just a typical example, the actual variables, will be dynamically determined.

Tip: Right-click in the Tronan Macro Editor and select one of these variables out of the context-menu.

Variable Name Description
FOLDER_SYSTEM e.g. C:\Winnt\System32
FOLDER_CURRENT The startup folder (probably the RSI-Shield installation folder)
FOLDER_STARTMENU_PROGRAMS e.g. C:\Documents and Settings\John\Start Menu\Programs
FOLDER_STARTMENU_PROGRAMS_ALL_USERS e.g. C:\Documents and Settings\All Users\Start Menu\Programs
FOLDER_PROGRAMFILES e.g. C:\Program Files
FOLDER_STARTUP e.g. C:\Documents and Settings\John\Start Menu\Programs\Startup
FOLDER_STARTUP_ALL_USERS e.g. C:\Documents and Settings\All Users\Start Menu\Programs\Startup
FOLDER_MACROMACHINE e.g. C:\Program Files\Tronan\MacroMachine
FOLDER_MACROS e.g. C:\Program Files\Tronan\...\Macros
FOLDER_MYMACROS e.g. C:\Program Files\Tronan\...\Macros\My Macros
FOLDER_SYSTEMMACROS e.g. C:\Program Files\Tronan\...\Macros\System Macros
FOLDER_HIDDENMACROS e.g. C:\Program Files\Tronan\...\Macros\Hidden Macros
FOLDER_RSISHIELD e.g. C:\Program Files\Tronan\RSI-Shield
FOLDER_COOKIES e.g. C:\Documents and Settings\John\Cookies
FOLDER_WINDOWS e.g. C:\WINNT
FOLDER_DESKTOP e.g. C:\Documents and Settings\John\Desktop
FOLDER_MYDOCUMENTS e.g. C:\Documents and Settings\John\My Documents
FOLDER_TEMP e.g. C:\Documents and Settings\John\Local Settings\Temp
IS_NT The variable gets filled with the text TRUE if the current machine is NT based or FALSE if it is not
LANGUAGE The language of RSI-Shield/MacroMachine
MACROMACHINE_SYSTEMID The systemcode of MacroMachine
MACRO_NAME The name of the running macro
NOW_DAY The current day (14 in 14 February 2001)
NOW_MONTH The current month. 1 is January, 2 is February etc.
NOW_YEAR The current year (2001 in 14 February 2001)
NOW_DAYOFWEEK The day of the week. 1 = sunday, 2 = monday etc.
NOW_MONTH_NAME The name of the month. e.g. January, February, March etc.
NOW_DAYOFWEEK_NAME The name of the day of the week. e.g. Sunday, Monday, Tuesday, etc.
NOW_SHORT_DATE The current date and time, represented shorly e.g. 2-14-2001 14:30:15
NOW_HOUR The current hour
NOW_MINUTE The current minute
NOW_SECOND The current number of seconds
RSISHIELD_SYSTEMID The systemcode of RSI-Shield
SCREEN_HEIGHT The height of the screen in pixels
SCREEN_WIDTH The width of the screen in pixels
USERNAME The Windows Login Name e.g. John Doe

Example:
// Load the system variables
LoadSystemVariables()
// Open the C:\WINNT\System32 folder with the explorer
Execute("
explorer.exe", "%FOLDER_SYSTEM%")

MacroMachineIsRunning(text VariableName = "isRunning")

This function has one optional parameter:
text VariableName: The name of the variable in which the result can be stored. Will get filled with 1 or 0. 1 = is running, 0 = is not running.

Use this function to determine if MacroMachine is currently running. If the MacroMachine tray icon is visible, it is running, otherwise it is not.

Example:
// Check if MacroMachine is running
MacroMachineIsRunning()
if ("isRunning", "=", 1)
  // If MacroMachine is running, open the context-menu
SendKeys("
[CTRL][ALT][SHIFT]m")
// And start the Settings Program
SendKeys("
[DOWN][ENTER]")
end()

MacroMachinePopupMenu()

This function has no parameters.

Call this function to make the context menu of the MacroMachine tray icon pop up.

Example:
// Show the MacroMachine menu
MacroMachinePopupMenu()

MacroMachineQuit()

This function has no parameters.

Call this function to stop (unload) MacroMachine.

Example:
// Stop MacroMachine
MacroMachineQuit()

MacroMachineStart()

This function has no parameters.

Call this function to start MacroMachine (if it is not running already).

Example:
// Start MacroMachine
MacroMachineStart()

MarkActiveWindow()

This function has no parameters.

This function should be called to provide a reference point for a ..WaitForWindow.. type of function. If you call for instance WaitForWindow without parameters, the function will wait for a new window to appear. What this actually does is that it will compare the current foreground window with the foreground window at the time MarkActiveWindow was called. If the two foreground windows are two different ones. The WaitForWindow will stop waiting.

This function will be called automatically at the beginning of a Macro Script and after each ..WaitForWindow.. type function.

Example:
// MarkActiveWindow is called implicitly..

// Start notepad and wait for it (a new window) to appear
ExecuteAndWaitForWindow("notepad.exe")
// MarkActiveWindow is called implicitly..

// Enter this sentence into notepad
SendKeys("This will be entered into notepad")

// Start the calculator
Execute("calc.exe")

// Wait for it to appear
WaitForWindow()

// Enter a calculation into the calculator
SendKeys("1+4[ENTER]")

Menu(text Options, text VariableName = "menuChoice" )

This function has two required and one optional parameter:
text Options: The options that you want to apear in the menu. These options should be separated by the pipe symbol|
text VariableName: The name of the variable you want to multiply the value of

Use this function to display a popup menu with options to choose from.

Example:
// Display a popup menu and prompt the result
Menu("Option1|Option2|Option3|Option4", "choosenOption")

if("choosenOption", "=", 0)
  Prompt("No option has been choosen")
else()
  Prompt("The following option has been choosen: %choosenOption%")
end()

MouseButton(text/number ButtonID = 0, text/number ActionID = 0)

This function has two optional parameters:
text/number ButtonID: The ID of the mouse button to push
text/number ActionID: The ID of the push action

Button ID Description
0 Left mouse button
1 Middel mouse button
2 Right mouse button

Action ID Description
0 Click (push+release)
1 Double click (push+release 2 times)
2 Push
3 Release

Example:
// Move the mouse to the upper-left corner of the screen
MouseMove(10, 10)
// Click the left mouse button once
MouseButton(
0, 0)

MouseMove(text/number X, text/number Y, text/1/0 UseAbsoluteCoordinates = 1)

This function has two required and one optional parameter:
text/number X: The x coordinate of the mouse-cursor
text/number Y: The y coordinate of the mouse-cursor
text/1/0 UseAbsoluteCoordinates: 1 = coordinates are relative to the screen, 0 = coordinates are relative to current mouse-cursor position

Use this function to move the mouse-cursor.

Example:
// Move the mouse to position (x, y) 100, 100
MouseMove(100, 100)
// Move the mouse 10 pixels to the left and 10 pixels down
// So we arrive at position 90, 110
MouseMove(-10, 10, 0)

MouseSequence(text MouseMovementData)

This function has one required parameter:
text MouseMovementData: The data to move the mouse cursor (a repetition of the following format: "delaytime, x, y")

This function is mainly intended for playback of recorded macros. When a macro is recorded, this command with its MouseMovementData is generated by the recording-tool. You can enter the data by hand, but you would be better of using the MouseMove command.

Example:
// Move the mouse cursor and click the left mouse button
MouseSequence("181,115,115, 10,115,116, 10,114,116, 10,113,117")
MouseButton(
0, 0)

MouseWheel(text/number WheelClicks)

This function has one required parameter:
text/number WheelClicks: The number of clicks the mouse wheel has to turn. A negative value turns the wheel down. A positive value turns it up.

This function can be used to simulate turning the mouse wheel.

Example:
// Rotate the mouse wheel 2 clicks up
MouseWheel(2)
// Rotate the mouse wheel 2 clicks down
MouseWheel(-2)

MoveFile(text SourcePath, text DestinationPath, text/1/0 StopIfMoveFails = 0)

This function has two required parameters, and one optional parameter:
text SourcePath: The path of the source file(s) or folder (you can use wildcards),
text DestinationPath: The path of the destination
text/1/0 StopIfMoveFails: flag to indicate whether the command should be considered failed if one of the copies did not succeed

Use this function to move some files from one location to another. You can also use this function to rename files or folders.

Example:

// Move all *.txt files from the C:\Source folder to the C:\Dest folder
// If one of them fails to move, we just ignore it
MoveFile("C:\Source\*.txt", "C:\Dest\")

// Do not stop the macro if one of the commands fails
StopOnFailure(0)

// Move readme.txt from C:\Source to C:\Dest
// The command should not ignore failures
MoveFile("
C:\Source\readme.txt", "C:\Dest\already read.txt", 1)

// Check if the move command failed
if_failed()

 

Prompt("Could not move the file")
end()

MultiplyVariable(text VariableName, text/number/real Value)

This function has two required parameters:
text VariableName: The name of the variable you want to multiply the value of
text/number/real Value: The value with which the value of the variable has to be multiplied by

Use this function to multiply the value of a variable.

Example:
// Put the number 5 into the variable 'counter'
SetVariable("
counter", 5)
// Multiply the value of 'counter' by 2
MultiplyVariable("
counter", 2)
// Now the value of 'counter' is 10
Prompt("
The value of 'counter' is now: %counter%")

PrintDebug(text Message, text/1/0 NewLine = 1)

This function has one required and one optional parameter:
text Message: The message that should be printed in the debug window
text/1/0 NewLine: 1 = The next message will be printed on a new line, 0 = The next message will be printed after this one (on the same line)

Use this function to print some debug text to the Debug Window. The Debug Window is part of the Tronan Macro Editor. It will automatically appear when a script is run inside of the editor and the PrintDebug function is used. This function can be used to output some text or values of variables or whatever you like, without influencing the normal flow of a script.

Example:
// Put the number 5 into the variable 'counter'
SetVariable("
counter", 5)
// Multiply the value of 'counter' by 2
MultiplyVariable("
counter", 2)
// This will output the text 'counter = 10' to the Debug Window
PrintDebug("
counter = %counter%")
// The enter key will be pressed 10 times
SendKeys("
[ENTER:%counter%]")

Prompt(text Message = "", text Title = "Tronan Macro", text/number StyleFlags = 0)

This function has three optional parameters:
text Message: The message that should be shown in the box
text Title: The title of the box
text/number StyleFlags: The style of the box

Style Flag Value
OK 0
OKCANCEL 1
ABORTRETRYIGNORE 2
YESNOCANCEL 3
YESNO 4
RETRYCANCEL 5
   
ICONHAND 16
ICONQUESTION 32
ICONASTERISK 64
   
DEFBUTTON1 0
DEFBUTTON2 256
DEFBUTTON3 512
DEFBUTTON4 768
   
NOFOCUS 32768
TOPMOST 262144
You can combine flags of different groups by adding them together

Results Value
OK 1
CANCEL 2
ABORT 3
RETRY 4
IGNORE 5
YES 6
NO 7

Use this function to display a dialog-box with a message in it. This function returns the value of the button that was pushed to close the box (see the Results table above). When you want to display a box, that will be dismissed automatically, you can use the TimeoutPrompt function.

Example:
// Show a box with an OK and a Cancel button
Prompt("
This is a box with an OK and a Cancel button", "Alert", 1)

// If the result was 1, the OK button was pressed
if ("last_result", "=", 1)
  Prompt("The OK button was pushed")
else()
  Prompt("The Cancel button was pushed")
end()

RegGetValue(text VariableName, text RegistryPath, text ValueName)

This function has three required parameters:
text VariableName: The name of the variable that can be used to store the value in
text RegistryPath: The path of a key in the registry (e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Tronan\MacroMachine\Settings)
text ValueName: The name of the value that you want to query for its data (e.g. Version). Provide an empty string to query the Default value.

Use this function to obtain a value from the registry.

Example:
// Retrieve the version of RSI-Shield from the registry
RegGetValue("
versionVar", "HKEY_LOCAL_MACHINE\SOFTWARE\Tronan\MacroMachine\Settings", "Version")
// And show it to us
Prompt("
You have MacroMachine version %versionVar% installed.")

RegSetValue(text RegistryPath, text ValueName, text TextValue)

This function has three required parameters:
text RegistryPath: The path of a key in the registry (e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Tronan\MacroMachine\Settings)
text ValueName: The name of the value that you want to store the data in (e.g. Version). Provide an empty string to set the Default value.
text
TextValue: The text value you want to store.

Use this function to set (create) a value in the registry.

Example:
// Store the a value in the registry
RegSetValue("
HKEY_LOCAL_MACHINE\SOFTWARE\Tronan\MacroMachine\Settings", "VersionDemo", "4.0")

RenameFile(text OldFilePath, text NewFilePath)

This function has two required parameters:
text OldFilePath: The path (name) of the file to rename (wildcards are NOT allowed)
text NewFilePath: The new path (name) of the file.

Use this function to rename a file.

Example:

// Do not stop the macro if one of the commands fails
StopOnFailure(0)

// Create a copy of the autoexec.bat file
CopyFile("C:\Autoexec.bat", "C:\Autoexec.tmp")
DeleteFile(
"C:\\autoexec.bak")
RenameFile("
C:\\autoexec.tmp", "C:\\Autoexec.bak")

// Check if one of the commands failed

if_failed()

 

Prompt("Could not copy or rename the file")
end()

ResetInternet(text/number NewLoadedValue = 0)

This function has one optional parameter:
text/number NewLoadedValue: The value 'Loaded items' should be reset to

Use this function to reset the Loaded items counter of Tronan Browser. The Tronan Browser is a Internet browser that was developed especially for Tronan Macros. It enables you to query how many items it has loaded since it was started or since it was reset by the ResetInternet command. Normally it would be very difficult to create a macro for the Internet, since you can not predict how long it will take for a page to load. When you use the Tronan Browser and the WaitForInternet command, however, this is not a problem anymore.

Example:
// Open Tronan Browser and navigate to the Tronan site
Internet("
http://www.tronan.com")
// Wait until at least one item got loaded
WaitForInternet(
1)
// Reset the Tronan Browser loaded-items-counter to zero
ResetInternet()

RSIShieldIsPause(text VariableName = "isPause")

This function has one optional parameter:
text VariableName: The name of the variable in which the result can be stored. Will get filled with 1 or 0. 1 = is in break, 0 = is not in break.

Use this function to determine if RSI-Shield is currently in a break. If the RSI-Shield counter is blinking, it is in a break, otherwise it is not.

NOTE: You have to remember that a macro script gets paused as well when RSI-Shield is on a break, so you can test RSI-Shield is breaking, but you will not now when the next command is executed (for certainly not as long as RSI-Shield is still on a break)..

Example:
RSIShieldIsPause()
Prompt("
This will only appear as soon as RSI-Shield is not on a break")

RSIShieldIsRunning(text VariableName = "isRunning")

This function has one optional parameter:
text VariableName: The name of the variable in which the result can be stored. Will get filled with 1 or 0. 1 = is running, 0 = is not running.

Use this function to determine if RSI-Shield is currently running. If the RSI-Shield counter is visible, it is running, otherwise it is not.

Example:
// Check if RSI-Shield is running
RSIShieldIsRunning()
if ("isRunning", "=", 1)
  // If RSI-Shield is running, open the context-menu
SendKeys("
[CTRL][ALT][SHIFT]p")
// And start the Settings Program
SendKeys("
[DOWN][ENTER]")
end()

RSIShieldPopupMenu()

This function has no parameters.

Call this function to make the context menu of the RSI-Shield counter pop up.

Example:
// Show the RSI-Shield menu
RSIShieldPopupMenu()

RSIShieldQuit()

This function has no parameters.

Call this function to stop (unload) RSI-Shield.

Example:
// Stop RSI-Shield
RSIShieldQuit()

RSIShieldStart()

This function has no parameters.

Call this function to start RSI-Shield (if it is not running already).

Example:
// Start RSI-Shield
RSIShieldStart()


General Information - General Functions S-Z - Flow Control Functions