RoBotScript Documentation:
This is the RoBotScript documentation. All Rights Reserved.
This is the RoBotScript documentation. All Rights Reserved.
RoBotScript based on JavaScript. So you can use similar syntax of JavaScript language syntax.
// This is a comment.
This section functions generally used for Desktop functions
bot.ShowDesktop();
There is no input or output parameter.
This function shows the desktop. Minimizes all active Windows.
Name | Description |
---|---|
ShowDesktop | It shows the desktop. |
Example:
bot.ShowDesktop();
bot.GetDesktopPath();
Get the full path of desktop.
Example:
var path = bot.GetDesktopPath();
bot.Alert(path);
bot.getResolution();
Get the resulation of primary Screen.
Example:
var res = bot.getResolution();
bot.Alert('Width:' + res.Width );
bot.CreateDesktopFolder(@folderName)
It creates a new folder on the desktop.
Name | Description |
---|---|
folderName | The name of the folder which you want to create. |
Example:
bot.CreateDesktopFolder('New Folder Name')
bot.EmptyRecycle();
Clears the Recycle Bin folder.
Example:
bot.EmptyRecycle();
This section functions Call system functions
bot.runApplication(@path,@params)
This command run an Windows application with command Arguments.
Name | Description |
---|---|
path | Windows Application name or Full path of an Executable File. |
params | Command Arguments. |
Example:
bot.runApplication('calc',''); //It runs Calculator App
bot.runCmd(@path,@params)
This command run an Command Line with command Arguments.
Name | Description |
---|---|
path | Windows Command Line Command name. |
params | Command Arguments. |
Example:
var cmd = bot.runCmd('ipconfig','');
bot.Alert(cmd);
bot.GetProcesses();
Get the list of running Processes
Example:
var processList = bot.GetProcesses();
bot.Alert(processList[0);
bot.KillprocessbyName(@processName)
Describe a parameter passed to you API-Header e.g. for Authorization.
Name | Description |
---|---|
processName | The name of the process |
Examples:
bot.KillprocessbyName('notepad');
bot.LogOffUser();
Log Offs current user.
Example:
bot.LogOffUser();
bot.LogOffUser();
Shut Downs the computer.
Example:
bot.ShutDownPC();
bot.LogOffUser();
Restarts the computer.
Example:
bot.RestartPC();
bot.PrintScreen(@path)
Takes snapshot of screen and save it to path.
Name | Description |
---|---|
path | Windows Application name or Full path of an Executable File. |
Example:
bot.PrintScreen('c:\\images\\snapshot.jpg'); //Save snapshot of screen
bot.PrintFile(@path)
Prints the specific file to printer.
Name | Description |
---|---|
path | File to print.It must be a text or readable file format. |
Example:
bot.PrintFile('c:\\images\\text.txt');
Waits for a time
bot.Wait(@time)
Waits for a limited time.
Name | Description |
---|---|
time | Float(Numeric) delays and waits. |
Example:
bot.Wait(1.5); //Waits 1.5 seconds
bot.WaitRandom(@min,@max)
Waits for a random in a range.
Name | Description |
---|---|
min | Float(Numeric) Minimum delay time. |
max | Float(Numeric) Maximum delay time. |
Example:
bot.WaitRandom(3,6); //Waits random time between 3 to 6 seconds
Mouse Functions as souch as Click, Move ..etc
bot.MoveTo(@x, @y)
Use this parameter in conjunction with the apidoc.json configuration parameter sampleUrl.
If sampleUrl
is set, all methods will have the api test form (the endpoint from @api will be appended).
Without sampleUrl only methods with @apiSampleRequest
will have a form.
Name | Description |
---|---|
x | X coordinat of screen( 0 to width of screeen.) |
y | Y coordinat of screen( 0 to height of screeen.) |
Examples:
bot.MoveTo(10,10);
bot.LeftClick();
LeftClick to the current position.
Example:
bot.LeftClick();
bot.RightClick();
RightClicks to the current position.
Example:
bot.RightClick();
bot.DblClick();
Double Click to the current position.
Example:
bot.DblClick();
Keyboard Functions
bot.SendKeys(@key)
Send keyboard keys to the Operationg system.
Name | Description |
---|---|
keys | Keys to send |
Name | Description |
---|---|
BACKSPACE | {BACKSPACE}, {BS}, or {BKSP}. |
BREAK | {BREAK}. |
CAPS LOCK | {CAPSLOCK}. |
DEL or DELETE | {DELETE} or {DEL} |
DOWN ARROW | {DOWN}. |
END | {END}. |
ENTER | {ENTER}or ~. |
ESC | {ESC} |
HELP | {HELP} |
HOME | {HOME} |
INS or INSERT | {INSERT} or {INS}. |
LEFT ARROW | {LEFT}. |
NUM LOCK | {NUMLOCK}. |
PAGE DOWN | {PGDN}. |
PAGE UP | {PGUP}. |
PRINT SCREEN | {PRTSC} (reserved for future use). |
RIGHT ARROW | {RIGHT}. |
SCROLL LOCK | {SCROLLLOCK}. |
TAB | {TAB}. |
UP ARROW | {UP}. |
F1 - F16 | {F1} - {F16} |
Keypad add | {ADD}. |
Keypad subtract | {SUBTRACT}. |
Keypad multiply | {MULTIPLY}. |
Keypad divide | {DIVIDE}. |
Example:
bot.SendKeys('Hello');
bot.SendKeysWithDelay(@key,@delay)
Send keyboard keys to the Operationg system.
Name | Description |
---|---|
keys | Keys to send |
delay |
Millisecond delay between in every single letter. With this param, any keyword written in slow. |
Example:
bot.SendKeysWithDelay('Hello',200);
Media Functions
bot.PlayAudio(@path)
Plays the specific .WAV file.
Name | Description |
---|---|
path | Path to play |
Example:
bot.PlayAudio('c:\\music\\tadaa.wav');
bot.StopAudio()
Stops the playing Audio file which played by StartAudio command.
Example:
bot.StopAudio();
Message Functions
bot.Alert(@message)
Shows Message on the screen.
Name | Description |
---|---|
message | Message to display |
Example:
bot.Alert('This is test');
Input Functions
bot.ShowFileDialog()
Shows the Open dialog to get existing filename .
Name | Description |
---|---|
Output | Returns selected file to open |
Example:
var file = bot.ShowFileDialog();
bot.ShowSaveDialog()
Shows the Save dialog to get new filename
Name | Description |
---|---|
Output | Returns selected file to save |
Example:
var file = bot.ShowSaveDialog();
bot.ShowColorDialog()
Shows the color dialog to get color.
Name | Description |
---|---|
Output | Returns selected color |
Example:
var color = bot.ShowColorDialog();
Folder Functions
bot.CreateFolder(@path)
Creates new Folder to spesiffic path.
Name | Description |
---|---|
path | Path to create folder. |
Example:
bot.CreateFolder('C:\\files\\newfolder1');
bot.MoveFolder(@source,@destination)
Moves Folder to spesiffic path
Name | Description |
---|---|
source | Source folder to copy |
destination | destination path to copy |
Example:
bot.MoveFolder('C:\\test','C:\\test2');
bot.DeleteFolder(@path)
Deletes folder.
Name | Description |
---|---|
path | Folder to delete |
Example:
bot.DeleteFolder('C:\\test');
bot.GetFolderList(@path)
Get subfolders in th selected path.
Name | Description |
---|---|
path | Folder to delete |
Output | Subfolders in the selected path |
Example:
var folders = bot.GetFolderList('C:\\test');
File Functions
bot.GetFileList(@path)
Get files in the selected path.
Name | Description |
---|---|
path | Folder path |
Output | Get Files in the selected path |
Example:
var files = bot.GetFileList('C:\\test');
bot.CopyFile(@source,@destination)
Copies files to spessific path
Name | Description |
---|---|
source | Source file to copy |
destination | destination filepath to copy |
Example:
bot.CopyFile('C:\\test\\1.txt','C:\\test2\2.txt');
bot.MoveFile(@source,@destination)
Moves file to spesiffic path
Name | Description |
---|---|
source | Source file to copy |
destination | destination filepath to copy |
Example:
bot.MoveFile('C:\\test\1.txt','C:\\test2\2.txt');
bot.DeleteFile(@path)
Deletes file.
Name | Description |
---|---|
path | Filepath to delete |
Example:
bot.DeleteFile('C:\\test\1.txt');
bot.ReadTextFromFile(@path)
Reads text file content in the selected path.
Name | Description |
---|---|
path | Filepath to read |
Output | Text Content in the selected file |
Example:
var content = bot.ReadTextFromFile('C:\\test');
bot.WritetoTextFile(@path,@content)
Write text content and save itto the new file.
Name | Description |
---|---|
path | Filepath to read |
content | Write Text Content into the selected file |
Example:
bot.WritetoTextFile('C:\\test\1/txt','This is content');
Clipboard Functions
bot.ClipboardCopy(@text)
Copy text to Clipboard .
Name | Description |
---|---|
text | Copy text to Clipboard. |
Example:
bot.ClipboardCopy('Copy This!');
bot.ClipboardPaste()
Get Clipboard text.
Name | Description |
---|---|
Output | Get Clipboard text |
Example:
var data = bot.ClipboardPaste();
Internet Functions
bot.ShowForm()
Shows the form for Navigate, Console or get Inform .
Example:
bot.ShowForm();
bot.WebOpen(@url)
Navigates an internet site or url address.
Name | Description |
---|---|
url | Url to navigate |
Example:
var text= bot.WebOpen('google.com').text;
bot.Alert(text);();
bot.POST_Data(@url,@postdata)
Post data to URL or webservice.
Name | Description |
---|---|
url | Post path to send |
postdata | Send data to post |
Example:
bot.POST_Data('google.com','C:\\Downloads');
bot.GET_Data(@url,@path)
Get Data from Internet site or URL.
Name | Description |
---|---|
url | path to get data |
output | Output string |
Example:
var data = bot.GET_Data('google.com');
bot.UploadToFTP(@url,@path,@username,@password)
Upload any local file to any ftp server.
Name | Description |
---|---|
url | ftp url to upload |
path | Local path to upload file |
username | ftp username |
password | ftp password |
Example:
bot.UploadToFTP('google.com');
E-mail Functions
bot.SendGMail(@text)
Send e-mail using Gmail Account.
Name | Description |
---|---|
toAddress | e-Mail address to send |
subject | Subject of an e-mail |
fromAddress | fromAddress (Your Gmail account) |
fromDisplayName | What do you want to see on Sender Name |
fromPassword | gMail pass |
body | Body of e-mail. It could be html |
[Output] | If it send success it returns "OK", otherwise the error message... |
Example:
bot.sendmail('someone@hotmail.com','subject','yourmail@gmail.com','Name Surname','pasword','Hello, How are you');
Network Functions
bot.Ping(@address)
Pings the address.
Name | Description |
---|---|
address | Address to ping |
[Output] | Output Text data |
Example:
var result = bot.Ping('www.google.com');
bot.Alert(result);
bot.GetIPAddress()
Returns IP Address.
Name | Description |
---|---|
[Output] | Output Text data |
Example:
var IP = bot.GetIPAddress();
bot.Alert(IP);
Database Functions
bot.CreateSqlConnection(@connection)
Create SQL connection for executing commands or get data.
Name | Description |
---|---|
connection | Connection String |
[Output] | Bool result |
Example:
var connect_result = bot.CreateSqlConnection('Integrated Security = SSPI; Persist Security Info = False; Initial Catalog = MYDATABASE; Data Source =.');
bot.ExecuteNonQuery(@sql)
Execute Non Query as such as Insert,Update,Delete
Name | Description |
---|---|
sql | SQL Command to Execute |
Example:
var IP = bot.ExecuteNonQuery();
bot.Alert(IP);
bot.GetSQLCommand(@sql)
Run and get results of SQL.
Name | Description |
---|---|
sql | SQL Query |
[Output] | Returns DataTable |
Example:
var data = bot.GetSQLCommand('select * from Users');
bot.CloseSqlConnection(@connection)
Close the current connection
Name | Description |
---|---|
[Output] | Bool result |
Example:
var connect_result = bot.CloseSqlConnection('Integrated Security = SSPI; Persist Security Info = False; Initial Catalog = MYDATABASE; Data Source =.');
Ready Functions
bot.Encrypt(@text,@password)
Encrypt text 256 SHA with password.
Name | Description |
---|---|
text | Text to Encrypt |
password | Password |
[Output] | Encrypted text result |
Example:
var result = bot.Encrypt('This is any text','123+');
bot.Alert(result);
bot.Decrypt(@text,@password)
Decrypt text 256 SHA with password.
Name | Description |
---|---|
text | Text to Decrypt |
password | Password |
[Output] | Decrypt text result |
Example:
var result = bot.Decrypt('This is any text','123+');
bot.Alert(result);
bot.createGUID()
Creates 25 character random unique identifier string
Name | Description |
---|---|
[Output] | Output Text |
Example:
var guid = bot.createGUID();
bot.Alert(guid);
bot.RandomNumber(@min,@max)
Creates random number between two number
Name | Description |
---|---|
min | Number 1 |
max | Maximim Number |
[Output] | Output Text |
Example:
var guid = bot.RandomNumber(5,10);
bot.Alert(guid);
LICENSE
Copyright (c) 2019 Silver Software Ltd
Sammy SARAC