1. Starting Guide

<< Click to Display Table of Contents >>

Navigation:  1. Starting Guides >

1. Starting Guide

1.3. How to Start   

Previous Top Next


Starting Guide

 

Commands you should know

These are the commands that you should start with

 

Some important Control Structures in Smart Package Robot-Script

 

Control Structure

Description

$$VAR=value

Variable assignment, used to set a value or String to a variable.
Implicitly using VAR. There are many VXX. - Commands,

VFP.$$NUM=0.345

Variable assignment, Floating Point Number

VIN.$$NUM=-588

Variable assignment, Integer Number

IVV.$$ABC>$$DEF 

"If Variable Value", compare the numerical Values in Variables and make a decision. There are many IXX.-Commands

IVS.$$ABC=$$DEF

"If-Variable-String" statement, used for conditional branching based on a variable's String/Text value.

ELS.

Else statement, used to specify alternative code to execute if the preceding condition is false.

EIF.

End If statement, used to mark the end of an IXX. .... EIF. block.

ITO. ... EIF.

If Timeout statement, used for conditional branching in case of errors/Timeout-Flag.

SCS. CAN. CAE. ESC.

Select Case statement, used for multi-way branching based on a variable's value.

JIZ. / JIS.

Jump-If-Zero / Jump if String - statements,  used for conditional branching based on a zero value. There are many JXX. - Commands.

:Label

Label definition, used for marking a section of code.

GTO.Label

Goto statement, used to jump to a labeled section of code.

GSB.RunIt

Subroutine call, used to execute a labeled section of code. GSB. / RET.

RET.

Return statement, used to return from a GSB. - subroutine call.

EXE. / EXX. 

Execute Executable Commands. 

Therre are many EXX. -Commands.

KPN.TestApp|a

 

"Kill Process by Name". End a Program forcefully.

CAL. / CAX.

Calculate Formulas and assign the result to a Variable.

DOL.1 .. OOP.

Endless loop. Accepting Loop. Executes the code between DOL.1 and OOP indefinitely.

DOL. ...  OOP.1

Rejecting Loop, Do-Loop, used for executing a block of code indefinitely until a condition is met.

FOR. .... NEX.

For-Next loop, used for iterating a block of code a specified number of times. Can use  a STEP, can use Floating Point numbers.

ATF.$$FIL|$$TXT

Command to append to a file.

CTF.$$FIL|$$TXT

Command to write a new file.

DEL.$$FIL

Command to delete a file.

MBX.

Message Box, used to display a message to the user.

PRT.

PRINT something in a Console Window. 
Use MBX.! to keep it alive, as it will close when the Script ends..

ENR.

End of routine. Marks the end of a subroutine.

END.

End statement, used to terminate the script.

 

This table summarizes some the most used  control structures found in the Smart Package Robot-Script.

Each control structure serves a specific purpose, such as conditional branching, looping, or subroutine calling.

 

 

1. Understand the Prototype Parameter-System

You need to understand some general concepts how the Robot-Script works.

"How do I tell the Robot what to do". For this the "Prototype Parameter System" is important.

So take a look:

The Prototype Parameter System

 

clip0509

 

2. Know all Commands that are used by InstaRec

Here are some Commands that you should Know because they are used by InstaRec:

 

STW. (Find Application WIndow)

SCW. (Find Button etc. inside the Application Window)

MLC.  (Click with the Mouse using the Mousepointer "Compatible Engine")

MLE. (Click with the Mouse not using the Mousepointer "Direct Engine")

BSC. (Click as often as needed to close a Window)

BTC. (Check or Uncheck Checkmarks)

WPT. (Wait until a Program has ended)

VAR.  (Define a Variable)

DBC.  (Set up a Parallel running Button-Clicker Robot)

END  (End the Script immediately)

 

 

If you know what these few commands do, then you can do already a LOT of things.

Next possibly look at:

IAI. (Check if an Application is installed or not)

GEP. (Get Path of an registered Executable)

MBX.  (Display a Messagebox)

IVV. (Check if a Varibale has some value or not)

CAL. (So mathematical and logical caluclations)

 

These are the most used commands.

 

3. Take a look at the more advanced commands

Here we have commands that use the Accessibility Engine and the graphical Commands.

Also we have the Commands to use the Buttonbar (Plugin01.exe).

 

AGR. - (Find Element in Browser or Office Application)

PIL. - (Launch the Buttonbar)

 

 

4. Invest some time. Save more time.

You will also find  a folder with "Sample Scripts". These scripts are carefully designed and commented.
Use them to see how things are done. Try them, change them. Play with the system. Make experiences.

 

Larger Fornt

 

4. Later you can take a look on the advanced features. Try the MACRO-Option and create your own commands. Include them into your scripts using the '#INC:-Preprocessor-command.

5. Its highly recommended that you make a training with a SPR*-Professional. Ask your distributor about the conditions.

6. Don't think the SPR is only usable for automated Software Installations. While this is the case, it is also usable for multiple other tasks.

7. Use it for Logging in to your favorite web-site, use it for automated testing. Let other people in your company also use it! You have the license to automate things! Use it.

 

* Smart-Package Robot

 

 

See also:

1.3. How to Start

1.3.1 The Scripting Process

1.3.2 Commands you should start with

1.3.3 Compiling a Standalone Executable

1.3.4 Compiling a package (SPRE)))

1.3.5 The Script Execution Process

1.4. The Prototype Parameter System

1.5. Speed Considerations

1.5.1 FAQ - How to ...

1.5.2 Using Variables

1.5.3 More about Variables

1.5.5 Global and Local Variables

1.5.6 Using the data stacks

1.5.7 Using Text-Strings

1.5.8 Basic String Operations

1.5.9. Organizing data items in blocks

1.6.1. Program Flow Control

1.6.2. Looping around

1.6.3 Flexible Loops

1.7. Application and PID

1.7.1 Applications and Threads

1.8. Selecting the Application (Topwindow)

1.8.1 The "Client" and the "Non-Client" Parts of a window

1.9. Locating Child-Windows