- Script Syntax
- Text Commands
- Mouse Click Emulation
- Delay Execution
- Submit Marker
- Clear Text Field
- Switch to Active Window
- Script Example
- Using GoTo URL and Match URL in a Login
- Enabling Application Launch from a GoTo URL
Use custom scripts when you need precise control over the keystrokes and clicks RoboForm sends to a window. This covers application Login targets such as terminal windows, tools like PuTTY, or any target with non-standard fields or submit buttons that RoboForm can't handle on its own.
NOTE: In order to use custom scripts in RoboForm, you will first need to have RoboForm for Windows installed and to add a Script field.
After adding a Script field, write a script in the space provided. You can program the sequence of keyboard key presses and mouse clicks to be executed by the "Fill Form" and "Fill & Submit" / "Login" commands (see below).
For example:
$u
ENTER
$p
SUBMIT:
ENTER
Script Syntax
A Script is a sequence of commands, separated by space characters (spaces, tabulation, new lines):
<command1> <command2> <command3>
‘#’ is a comment symbol. Part of the string from '#' to the end of the line is ignored.
Text Commands
Text commands are used to send characters to the application window, emulating keyboard input.
1) Literal string
"<text_string>"
A quoted character string, ANSI or UNICODE is sent to the application window.
Escape codes like \n, \r, \t are not supported.
2) Password and User ID fields
$p – a string from Password field
$u – type value of the User ID field
3) TOTP field
$t – type the current TOTP (one-time code) generated from the Login's Verification Code (TOTP Key) field.
4) Other Login fields
%<field_name>%
<field_name> can be specified partially, i.e., only control ID or caption.
5) Square brackets
[<text_string>]
Text inside square brackets is typed out literally, character by character. Use brackets to escape the quote symbol, which cannot otherwise appear inside a literal string. Encase the whole string, e.g. ["hello world"], or bracket only the quote characters, e.g. ["]"hello world"["] — both type "hello world".
6) Special keys
Available key names:
SPACE, TAB, ENTER, ESC,
UP, DOWN, LEFT, RIGHT,
HOME, END, PGUP, PGDOWN,
INS, DEL, BACK, F1- F12
SHIFT CTRL ALT
<key_name>
press and release key
<key_name>+
press a key
<key_name>-
release a key
Mouse Click Emulation
*<x>,<y>
Mouse click at coordinates specified relatively to left top corner of window.
Delay Execution
DELAY <seconds>
<seconds> – a number of seconds, it can have a fractional part. Fraction must be separated with a point. There must be a space between the command and the number.
Submit Marker
SUBMIT:
This label separates filling and submitting parts of the script. The part after the label is executed only by the "Fill & Submit" command and not by "Fill Forms."
Clear Text Field
CLEAR
This command is a shortcut for the following sequence of script commands:
HOME SHIFT+ END SHIFT- DELETE
Switch to Active Window
POPUP
To prevent the typing of private/sensitive information into the wrong window, RoboForm prevents typing and mouse click to any windows other than the window selected as the target of the "Fill Forms" or "Fill & Submit" commands. The POPUP command switches the target to the current active window.
Script Example
*100,200 # click at (100,200) in the window
"uoydellortI" TAB # type string and press TAB key
$u TAB # type value of User ID field and press TAB key
$p TAB # type value of Password field and press TAB key
DELAY 1.5 # delay for 1.5 seconds
SUBMIT: # next lines are used to submit the data
SHIFT+ ENTER SHIFT- # press SHIFT+ENTER
Typing a literal quote with square brackets (see Text Commands above):
["hello world"] # encase the whole string
["]"hello world"["] # or bracket only the quotes
Using GoTo URL and Match URL in a Login
GoTo URL
Is used to start the application and provide command-line parameters.
Format:
exe://"<path_to_executable>" <command_line_arguments>
The 'exe://' prefix specifies that this Login is used for fill data in a Windows application and not in a web browser.
<path_to_executable> – full path to the application executable file. RoboForm uses this path to start the application. E.g.: C:\WINDOWS\explorer.exe
<command_line_arguments> – command line arguments that should be passed to the application.
NOTE: For security reasons, launching an application directly from a GoTo URL (the exe:// direct Log In behavior) is turned off by default for Application Logins. This prevents a Login from being used to launch arbitrary executables or scripts on your machine. If you need this behavior for a trusted application, you can enable launching executables from a GoTo URL in RoboForm's settings.
Match URL
Is used to find the exact window for the Login.
Format:
exe://<name_of_executable>/<window_title>
<name_of_executable> – file name of the application executable file without extension. E.g: explorer
<window_title> – text of the window title. It can contain '*' as a wildcard at the start or the end.
Samples:
exe://<name_of_executable>/<window_title> – exact match
exe://<name_of_executable> – any title
exe://<name_of_executable>/* – any title
exe://<name_of_executable>/*<substring>*
exe://<name_of_executable>/<substring>*
exe://<name_of_executable>/*<substring>
Enabling Application Launch from a GoTo URL
As noted above, launching an application directly from a GoTo URL (the exe:// direct Log In behavior) is turned off by default for security reasons. If you trust the application and want RoboForm to launch it from the Login, you can turn this behavior back on:
- Open the RoboForm main menu and go to Options.
- Select the Security tab.
- Enable Allow launching applications from Application Logins (GoTo URL).
- Click OK / Save to apply the change.
Only enable this if you launch trusted applications from your Logins. While disabled, RoboForm will still fill and submit data into an already-open application window; only the automatic launching of the executable is blocked.
Comments
0 comments
Article is closed for comments.