Demo

RoBotScript Documentation:

This is the RoBotScript documentation. All Rights Reserved.

Getting started

Preface

RoBotScript based on JavaScript. So you can use similar syntax of JavaScript language syntax.

//  This is a comment. 

Desktop

This section functions generally used for Desktop functions

ShowDesktop

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();

GetDesktopPath()

bot.GetDesktopPath();

Get the full path of desktop.

Example:

var path = bot.GetDesktopPath();
bot.Alert(path);
		

getResolution()

bot.getResolution();

Get the resulation of primary Screen.

Example:

var res = bot.getResolution();
bot.Alert('Width:' + res.Width );
		

CreateDesktopFolder

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')

EmptyRecycle

bot.EmptyRecycle();

Clears the Recycle Bin folder.

Example:

bot.EmptyRecycle();

System

This section functions Call system functions

runApplication

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
		

runCmd

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);
		

GetProcesses

bot.GetProcesses();

Get the list of running Processes

Example:

var processList = bot.GetProcesses();
bot.Alert(processList[0);
		

KillprocessbyName

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');

LogOffUser

bot.LogOffUser();

Log Offs current user.

Example:

bot.LogOffUser();

ShutDownPC

bot.LogOffUser();

Shut Downs the computer.

Example:

bot.ShutDownPC();

RestartPC

bot.LogOffUser();

Restarts the computer.

Example:

bot.RestartPC();

PrintScreen

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
		

PrintFile

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');	
		

Wait

Waits for a time

Wait

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
		

WaitRandom

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

Mouse Functions as souch as Click, Move ..etc

MoveTo

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);

LeftClick

bot.LeftClick();

LeftClick to the current position.

Example:

bot.LeftClick();

RightClick

bot.RightClick();

RightClicks to the current position.

Example:

bot.RightClick();

DblClick

bot.DblClick();

Double Click to the current position.

Example:

bot.DblClick();

Keyboard

Keyboard Functions

SendKeys

bot.SendKeys(@key)

Send keyboard keys to the Operationg system.

Name Description
keys Keys to send

Settings for Special Keys

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');	
		

SendKeysWithDelay

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

Media Functions

PlayAudio

bot.PlayAudio(@path)

Plays the specific .WAV file.

Name Description
path Path to play

Example:

bot.PlayAudio('c:\\music\\tadaa.wav');	
		

StopAudio

bot.StopAudio()

Stops the playing Audio file which played by StartAudio command.

Example:

bot.StopAudio();	
		

Message

Message Functions

Alert

bot.Alert(@message)

Shows Message on the screen.

Name Description
message Message to display

Example:

bot.Alert('This is test');	
		

Input

Input Functions

ShowFileDialog

bot.ShowFileDialog()

Shows the Open dialog to get existing filename .

Name Description
Output Returns selected file to open

Example:

var file = bot.ShowFileDialog();	
		

ShowSaveDialog

bot.ShowSaveDialog()

Shows the Save dialog to get new filename

Name Description
Output Returns selected file to save

Example:

var file = bot.ShowSaveDialog();	
		

ShowColorDialog

bot.ShowColorDialog()

Shows the color dialog to get color.

Name Description
Output Returns selected color

Example:

var color = bot.ShowColorDialog();	
		

Folder

Folder Functions

CreateFolder

bot.CreateFolder(@path)

Creates new Folder to spesiffic path.

Name Description
path Path to create folder.

Example:

bot.CreateFolder('C:\\files\\newfolder1');	
		

MoveFolder

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');	
		

DeleteFolder

bot.DeleteFolder(@path)

Deletes folder.

Name Description
path Folder to delete

Example:

bot.DeleteFolder('C:\\test');	
		

GetFolderList

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');	
		

Files

File Functions

GetFileList

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');	
		

CopyFile

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');	
		

MoveFile

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');	
		

DeleteFile

bot.DeleteFile(@path)

Deletes file.

Name Description
path Filepath to delete

Example:

bot.DeleteFile('C:\\test\1.txt');	
		

ReadTextFromFile

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');	
		

WritetoTextFile

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

Clipboard Functions

ClipboardCopy

bot.ClipboardCopy(@text)

Copy text to Clipboard .

Name Description
text Copy text to Clipboard.

Example:

bot.ClipboardCopy('Copy This!');	
		

ClipboardPaste

bot.ClipboardPaste()

Get Clipboard text.

Name Description
Output Get Clipboard text

Example:

var data = bot.ClipboardPaste();	
		

Internet

Internet Functions

ShowForm

bot.ShowForm()

Shows the form for Navigate, Console or get Inform .

Example:

bot.ShowForm();	
		

WebOpen

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);();	
		

POST_Data

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');
		

GET_Data

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');
		

UploadToFTP

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

E-mail Functions

SendGMail

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

Network Functions

Ping

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);
		

GetIPAddress

bot.GetIPAddress()

Returns IP Address.

Name Description
[Output] Output Text data

Example:

var IP = bot.GetIPAddress();	
bot.Alert(IP);
		

Database

Database Functions

CreateSqlConnection

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 =.');
		

ExecuteNonQuery

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);
		

GetSQLCommand

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');	

		

CloseSqlConnection

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 =.');
		

Functions

Ready Functions

Encrypt

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);
		

Decrypt

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);
		

CreateGUID

bot.createGUID()

Creates 25 character random unique identifier string

Name Description
[Output] Output Text

Example:

var guid = bot.createGUID();	
bot.Alert(guid);
		

RandomNumber

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);
		

MIT License