addprofile – adds a new user profile
Syntax options:
addprofile PROFILENAME
Notes:
Adds a profile. Generally, this command should only be used in an automated user-setup process. It is not a
recommended way to create new profiles.
Back to List
alertset – change Guardian settings and notify user of change
Syntax options:
alertset SETTING number/text VALUE (set the value of the Guardian setting specified by SETTING to VALUE)
Notes:
This command is identical to the 'set' command described below, except that, if the current value of SETTING is not
already VALUE (i.e. the setting needs to be updated), the user will receive a message letting them know that the setting
is being changed.
Back to List
bfedit
– modify the list of BreakTimer filters
Syntax options:
bfedit add active/running disable/polite APPLICATION-TITLEBAR-TEXT
bfedit delete APPLICATION-TITLEBAR-TEXT
bfedit deleteall
Notes:
Commands to add and remove BreakTimer filters.
To add a filter, use a command like "bfedit add running disable PowerPoint Slide Show". The ‘active’ option means this
filter applies when the application is the active foreground application. The ‘running’ option means this filter applies if
the application is running at all. The ‘disable’ option means that while the condition (active or running) is true, the
BreakTimer should be disabled. The ‘polite’ option means that while the condition is true, BreakTimer should be in
polite mode (where a "Break Needed" button must be clicked to start the break). The application name corresponds to
the text in the title-bar of the application window.
To delete a filter, you need only include a fragment of the application name for the filter you wish to delete. For
example, you could use either "bfedit delete PowerPoint Slide Show" or "bfedit delete PowerP".
To delete the all BreakTimer filters, use "bfedit deleteall".
Back to List
discomfort
– notate where a user is experiencing discomfort for HSRs
Syntax options:
discomfort WristHand/NeckUpperBack/Shoulder/ElbowForearm/WristHand 1/0
Notes:
Tells Guardian to set discomfort points associated with the specified area to be set (1) or unset (0). This command is for
use by third-party applications that wish to set HSR values.
Back to List
exit
– terminate Guardian
Syntax options:
exit
Notes:
Exits Guardian.
Back to List
fmnedit
– modify the list of ForgetMeNots
Syntax options:
fmnedit add FORGETMENOTMESSAGE
fmnedit delete FORGETMENOTMESSAGEFRAGMENT
fmnedit deleteall
fmnedit addex DISPLAYFREQUENCY SOURCECHARACTER FORGETMENOTMESSAGE
fmnedit deletefromsource SOURCECHARACTER
Notes:
Commands to add and remove ForgetMeNot messages.
To add a message, use a command like "fmnedit add Remember
to rest".
You can add line-breaks by embedding within the message (e.g. ‘fmnedit add
Remember ***This ***That’). This will also cause messages to be drawn left-justified instead of centered.
To delete a message, you need only include a fragment of the message you wish to delete.
For example, you could use
either "fmnedit delete Remember to rest" or "fmnedit delete Remember" or "fmnedit delete to rest" to delete the message
added in the example above.
To delete the entire list of ForgetMeNots, use "fmnedit deleteall".
Two additional commands are normally not used by users but external 3rd party tools.
‘fmnedit addex’ allows you to add a ForgetMeNot but additionally specify the frequency of display (from 1 to 100, 1 means extremely rarely, 100 means
often, 50 is default value for ‘fmnedit add’). It also lets you specify a source for the item. It defaults to ‘U’ with ‘fmnedit
add’ (the U stands for User).
But the source can be other things which allows you to use ‘fmnedit deletefromsource’.
‘fmnedit deletefromsource’ lets you delete all strings from a particular source. ‘S’ is used by the system.
Back to List
fset
– remotely control Guardian settings and specify data type
Syntax options:
fset SETTING number/text VALUE (set the value of the Guardian setting specified by SETTING to VALUE)
Notes:
Exactly like the ‘set’ command except the number/text argument lets you specify if the data should be stored as a
number or a string.
Back to List
insertfile
– insert the contents of the specified text file into the current application
Syntax options:
insertfile FILENAME
Notes:
Inserts the text stored in the file FILENAME into the application with edit focus. It does so by copying the text into the
Copy buffer and then pasting it into the current application in focus.
Example: insertfile C:\My Documents\StandardEmail.txt
Back to List
integrate
– command to integrate HR data from a database into Guardian reporting
Syntax options:
Integrate enc/clr DATABASE
Notes:
The ‘integrate’ command causes Guardian to search the database file for HR data for the logged in user, and to store the
relevant data. The ‘enc’ option states that the database has been encoded. The ‘clr’ option states that the database is
clear text. The format for the clear text database is a series of lines each with the following information:
Windows Login Name,Full Name,Email,EmployeeID#,Location,Department,Script
If fields include a comma, they must be enclosed in quotes.
Back to List
log
– control the script log file
Syntax options:
log file FILENAME (specify a file to log script information to)
log error 1/0 (specify if errors should be logged, default=1)
log info 1/0 (specify if informational msgs should be logged, default=1)
log msgs 1/0 (specify if the 'msg log' command actually writes to the log file, default=
1)
Notes:
The log file gets 3 kinds of messages. Error messages are added to the log file when a command in the script file
is invalid or results in an error. Info messages are added by certain commands (e.g., the 'register' command logs when
a user is first registered, and the 'set' command logs your changes to a user's setup). You can create your own
messages and write them to the log file (or display them on the user's screen) with the 'msg'
command.
Example:
# define where to write the log file
log file \\NETDRIVE\Guardian\log.txt
# this next line specifies that error messages should be discarded and not written into the log file
log error 0
msg text This message is added to log.txt each time a user comes online in Guardian
msg log
msg clear
# this next line specifies that error messages should be reenabled for subsequent errors
log error 1
Back to List
menuedit
– modify the list of Soft Menu Items
Syntax options:
menuedit add SOURCECHARACTER MENUNUM INSERTPOSITION "MENUITEMTEXT" COMMAND
menuedit deleteall
menuedit deletefromsource SOURCECHARACTER
Notes:
Commands to add and remove soft menu items. To add an item, use "menuedit add". The
SOURCECHARACTER identifies the category of the menuitem for the purpose of deleting all items from a particular category. It
is recommended to use source ‘U’ for user items.
MENUNUM is 0 for Tools, 1 for Setup, 2 for Help.
INSERTPOSITION tells where in the menu to put the item (1 is first, 2 is second, etc., and 0 means last item in menu).
"menu deletefromsource" deletes all menu items in the specified category. "menu deleteall" deletes all soft menu
items.
Example:
menuedit add G 0 0 "Visit Guardian Website" "open http://www.guardian-eos.com.au"
menuedit deletefromsource G (deletes only the above menu item and others created with a source character of ‘G’)
Back to List
mouse
– control mouse movement and clicking
Syntax options:
mouse click/dblclick/rtclick/ldown/lup/rdown/rup/mdown/mup
mouse relmove delx dely
mouse absmove client/screen xpos ypos
Notes:
The first usage line does mouse clicking.
‘click’ is a single left click.
‘dblclick’ is a double left click.
‘rtclick’ is a single right click.
‘ldown’ presses and holds down the left mouse button.
‘lup’ releases the left mouse button after an ‘ldown’.
‘mdown/mup’ and ‘rdown/rup’ do the same for the middle and right buttons.
‘mouse relmove’ moves the mouse the distance specified from its current position. Distance is specified in pixels
(screen dots).
‘mouse absmove’ moves the mouse to an absolute position on the screen. If the third argument is ‘client’ then
the coordinates are relative to the client area in the currently active window. If the third argument is ‘screen’ then
the coordinates are relative to the upper left corner of the screen.
Back to List
msg
– create messages that can be stored in the log file or displayed on a user's screen
Syntax options:
msg text TEXT (append TEXT to the current message
buffer)
msg time (append the current time & date to the message buffer)
msg send (display the current message buffer on the user's screen and then clear the message buffer (i.e. 'msg clear'))
msg log (write the current message buffer to the log file (but don’t reset the message buffer (see 'msg clear'))
msg post URL (posts the built string to the specified URL)
msg clear (clear the message buffer. This only needs to be used between messages that are going only to the log file.)
Notes:
The 'msg' command allows you to format a message into a 'message buffer' for writing to the log file and/or
displaying on a user's screen at startup time. You create a message by appending pieces of the message to the message buffer
and then writing it to the log file ('msg log') or sending it to the user's screen ('msg send'). Sending the message to the
user's screen with 'msg send' also clears the message buffer (in preparation for creating your next message). (The only
reason you need to explicitly write 'msg clear' between commands that you write to the log file is that if you want to send
a message to both the log file and the user's screen, you build the message buffer, then call 'msg log' then 'msg clear'.
If 'msg log' also cleared the message buffer, you'd have to rebuild the message twice to send it both places.) The ‘msg
post’ command enables advanced users to execute web POST commands (e.g. ‘msg textfile=log.txt&info= hello’, ‘msg
post http://myweb.com/log.cgi’ would execute‘http://myweb.com/log.cgi?file=log.txt&info=hello)
Example 1:
msg text Hello
msg $n
msg send
msg text The current time is
msg time
msg send
Example 2:
msg text User
msg $n
msg text logged in at
msg time
log msg
msg clear
msg text User's break-enabled state is
msg setting u\$p\BreakTimer\Enabled
log msg
msg clear
Back to List
nop
– performs no function. A placeholder that can be useful in certain places.
Syntax options:
nop
Notes:
Does nothing. Can be used, for example in a conditional statement, to indicate that nothing should be done in one of the
conditional results.
Back to List
open
– open a file, folder, application or webpage
Syntax options:
open FILENAME
open FOLDER
open APPLICATION COMMANDOPTIONS
open WEBPAGE
Notes:
Opens/launches the specified item.
Example:
open "c:\My Documents\phonelist.txt"
open "c:\My Documents"
open notepad.exe
open notepad.exe "c:\My Documents\phonelist.txt"
open http://www.Guardian.com
Back to List
queryset
– ask user for the value of a setting
Syntax options:
queryset SETTING number/text PROMPT (ask user for the value of SETTING)
queryset SETTING number/text PROMPT VAL1 VAL2 … VAL-N (ask user for value of SETTING from N choices)
Notes:
This command is like the 'set' command described above, except that here the user provides the value for the setting. If
values are given, then instead of a freeform dialog, a combobox with the provided options is shown to the user.
Example:
queryset m\Guardian\DataFolder "Enter the network path for the data folder:"
queryset m\Guardian\DataFolder "Enter the network path for the data folder:" "S:\Group1\Data" "S:\Group2\Data"
queryset m\Custom\Value "Enter general value" "value 1" "value 2" "value 3"
Back to List
question
– ask the user a question, and execute a command based on the answer
Syntax options:
question prompt PROMPT (sets the question to be asked)
question caption CAPTION (sets the caption of the popup window)
question answer ANSWER (adds another possible answer to question)
question ask CMD1 [CMD2…] (asks the question and executes associated script)
Notes:
Allows conditional execution of a command based on a user’s answer to a question. Up to 5 answers can be given, and
the number of specified CMDs in the "question ask" command must correspond to the number of "question answer *"
commands issued.
Example:
question prompt Which division are you in?
question answer "Laser research"
question answer "Materials processing"
question answer "Data analysis"
question ask "read c:\laser.txt" "read c:\materials.txt" "read http://www.acme.com/analysis.txt"
question prompt Visit which website?
question caption Website Decision…
question answer "Guardian"
question answer "Google"
question ask "open http://www.Guardian.com" "open http://www.google.com"
question prompt Please specify your office location?
question caption Location
question answer California
question answer New York
question ask "$do(msg text The Helpdesk is at x1234,msg send)" "$do(msg text The Helpdesk is at x5678,msg send)"
Back to List
read
– execute a script file
Syntax options:
read FILESPEC (process script file at FILESPEC)
Notes:
Execute commands in a script file. Calls into script files can be nested arbitrarily deeply. FILESPEC can be either a
local filename, a network filename, or an http:// based URL.
Example:
read c:\Guardian Scripts\doit.txt
read http://www.yourcompany.com/rsiscripts/doit.txt
Back to List
refresh
– refresh the user interface state (buttons, menus, etc.)
Syntax options:
refresh
Notes:
After some script commands (e.g. set), the user interface may need to be updated. For example, if you enable/disable a
menu item or if you turn AutoClick/BreakTimer/ForgetMeNots on/off, the user-interface must be updated to reflect this.
Use the refresh command after such operations so that the user interface is immediately updated.
Back to List
register
– register Guardian using a specified registration code
Syntax options:
register REGISTRATIONCODE (registers user if they are not currently registered)
Notes:
If users run Guardian by loading Guardian off the server every time they start up, then only the copy of Guardian on
the server needs to be registered with a registration code (and thus you don’t need to use this command). However, if
each user is installing Guardian on their personal machine, each copy of Guardian must be individually registered.
This command allows the registration process to be automated. If a user is not yet registered, then this command will
register their copy using REGISTRATIONCODE (assuming it is a valid registration code). If the registration code starts
with ‘x’, then internet access is required to successfully complete the registration process.
Example:
register xacme1234
Back to List
sendconfig / senddata
– transmit configuration and DataLogger data to OES database
Notes:
These commands are only for use by the OES to request data from Guardian.
Back to List
sendhsr
– trigger the submission of a health status report
Syntax options:
sendhsr query/noquery/nosurvey
Notes:
The ‘sendhsr’ command causes Guardian to trigger the submission of a Status Report to a previously configured
location.
‘sendhsr noquery’ causes a DataLogger summary and previously set survey responses to be submitted (even
though survey responses may be old or may never have been set).
‘sendhsr nosurvey’ causes a DataLogger summary to
be submitted (but not survey responses) – which is equivalent to a "DataLogger Status Report" (DSR).
‘sendhsr query’ triggers a user survey window to appear (including a discomfort survey) and submits the survey information, and if the
user permits it, also sends a DataLogger summary.
‘sendhsr query’ is equivalent to a "Health Status Report" (HSR).
The
DataLogger summary submitted in each case is composed of averages of recent DataLogger data. The length of time
over which the average is computed for ‘sendhsr query’ is in the
HKEY_CURRENT_USER\Software\Guardian\Settings\$p\Reports\DaysInSample registry key.
The length of time over
which the average is computed for ‘sendhsr noquery’ and ‘sendhsr nosurvey’ is in the
HKEY_CURRENT_USER\Software\Guardian\Settings\$p\Reports\DSRDaysInSample registry key.
Back to List
set
– remotely control Guardian settings
Syntax options:
set SETTING VALUE (set the value of the Guardian setting specified by SETTING to VALUE)
Notes:
This command lets you control user settings remotely.
"SETTING" specifies the setting you wish to change and
"VALUE" is what you want to set it to
Each setting that appears in the Guardian Settings Dialog (and several
others) can be specified with the SETTING argument. The key is to understand how SETTING is specified.
Each Guardian setting has a location within the registry, and SETTING must correspond to that location.
All changeable settings are stored either in HKEY_LOCAL_MACHINE\Software\Guardian\Settings or
HKEY_CURRENT_USER\Software\Guardian\Settings. The SETTING identifier begins with a m\ for the
HKEY_LOCAL_MACHINE settings (i.e. m for machine-based settings) and u\ for the HKEY_CURRENT_USER
settings (i.e. user-based settings). The rest of the string is the rest of the registry path to the setting.
For example, the organization name is stored in HKEY_LOCAL_MACHINE\Software\Guardian\Settings\Guardian\OrganizationName,
so the SETTING identifier is m\Guardian\OrganizationName. To change it, you could use:
set m\Guardian\OrganizationName ACME Inc.
Because most (but not all) HKEY_CURRENT_USER settings are specific to a particular profile, you must also specify
the profile you wish to change. Often in a startup file, however, you don’t know the profile – in other words, you want
multiple users to use the same startup script and have it affect their current profile. You can specify the current profile
with the $p substitution (see pre-processing section).
For example, to enable the BreakTimer for the current user/profile,
you could use the command:
set u\$p\BreakTimer\Enabled 1
Note that for boolean settings (settings than can only be true or false), you use 1 for true and 0 for false.
You could also create a command that only changes the setting for a particular profile. For example:
set u\_JohnSmith\BreakTimer\Enabled 1
The 'set' command is powerful in that it lets you arbitrarily write into a user's profile. There is no checking that the
setting you are trying to change is a valid setting or that you are not changing an inappropriate setting.
For example, if
you misspell something in SETTING, you will create a new (probably irrelevant) setting. If you were to arbitrarily
change a setting like "the number of user profiles on this PC", you would likely damage the integrity of the user profiles
on the PC. Please feel free to contact Ergonomic Office directly at 1300 555 930 if you would like assistance with
your particular application.
Examples:
# specify where all users's usage data should be stored
set m\Guardian\DataFolder \\NETDRIVE\Guardian\Data
# specify where Health Status Reports should be filed
set m\Guardian\ReportFilingLocation *N:\\NETDRIVE\Guardian\HSR
# specify your organization's name
set m\Guardian\OrganizationName Acme, Inc.
# This changes the minimum time between breaks for the current profile to 15 minutes
set u\$p\BreakTimer\MinInterBreakTime 15
set u\$p\BreakTimer\MinInterBreakTimeEnabled 1
# This disables access to the ForgetMeNots settings from the user interface
set u\GeneralSetup\AccessFMN 0
Back to List
setenv
– set an environment variable
Syntax options:
setenv ENVIRONMENT-VARIABLE [VALUE]
Notes:
This command sets a system environment variable. The value of environment variables can be accessed with $env()
Example:
setenv RSI_DEPARTMENT_CODE 3
setenv RSI_DEPARTMENT $plus($env(RSI_DEPARTMENT_CODE),1) #increment variable
Back to List
setvar
– creates an alias for a string to be used elsewhere in script
Syntax options:
setvar 1-9 VALUE
Notes:
Defines 1 of 9 string variables that can be substituted in subsequent commands by a ‘$’ followed by the variable number.
Example:
setvar 1 \\networkdrive\Guardian
set m\Guardian\DataFolder $1\data
set m\Guardian\StartupFile $1\scripts\startup.txt
set m\Guardian\NewUserScript $1\scripts\newuser.txt
Back to List
type
– type specified text
Syntax options:
type TEXT
Notes:
Types specified text as if you typed it from the keyboard.
The following special keypresses can be created: ‹CTRL›,
‹SHIFT› or ‹ALT›
for modified keys (e.g. to do Ctrl-Alt Y, use ‹CTRL‹ALTy››).
For Shift, just use the capital letter, (e.g. for
Ctrl-Shift-Y use ‹CTRLY›).
You can also use ‹TAB›, ‹ENTER›, ‹BACKSPACE›,
‹UP›, ‹DOWN›, ‹LEFT›, ‹RIGHT›, ‹ESC›, ‹PAGEUP›, ‹PAGEDOWN›, ‹HOME›, ‹END›,
‹INSERT›, ‹DELETE›, ‹SCROLLLOCK›, ‹PAUSE›, ‹WINKEY›, ‹RIGHTCLICKKEY›, ‹BREAK›,‹LESSTHAN›, ‹GREATERTHAN› and ‹F1› through ‹F12›.
Example:
type This is a test‹ENTER›
// these next two lines would start an email, fill in the fields and send it (using an already running Outlook session)
open "C:\Program Files\Outlook Express\MSIMN.EXE"
type info@guardian-eos.com.au‹TAB›‹TAB›‹TAB›Hi‹TAB›Joe,‹ENTER›Hi.‹ENTER›‹CTRL‹ENTER›
Back to List
update
– change folder for DataLogger or Profile data storage and copy data to new folder
Syntax options:
update datafolder/profilefolder NEWFOLDER
Notes:
Changes where Guardian stores either DataLogger data or settings profile data (i.e. roaming profile). This setting could
be changed with the ‘set’ command, but this command also copies the current data to the new location, providing a
mechanism for a seamless transfer of storage location (whereas the set command would just change where data was
written in the future).
Example:
update datafolder S:\NetDrive\Guardian\Data
update profilefolder \\svr010\NetDrive\Guardian\Data
Back to List
wait
– wait specified time before continuing to run script
Syntax options:
wait SECONDS
Notes:
Pauses execution of the script file for the specified number of seconds (within a range of 0.1 to 60 seconds).
Example:
wait 5 (wait 5 seconds)
wait 1.5 (wait 1 and a half seconds)
Back to List
window
– control aspects of the main Guardian display window
Syntax options:
window hide/show/center
window alwaysontop/strainbars/autohidebuttons/showtimes 1/0
Notes:
Affect the display of the main window.
"Window Hide" and "Window Show" cause the main window to either hide in
the system tray or be visible on the screen.
"Window Center" forces the window to be visible and appear at the center of
the screen.
"Window AlwaysOnTop" sets if the display window should always be on top of other windows.
"Windows StrainBars" sets if the strain indicators should be shown in the main display.
"Windows AutoHideButtons" sets if the
main control buttons should automatically hide when the mouse is not over the Guardian window.
"Windows
ShowTimes" sets if the work times (e.g. time since last break, time to next break, etc.) should appear in the main
window.
Examples:
window hide (hide the main Guardian window)
window strainbars 1 (show the strainbars)
Back to List