Archive

Archive for June, 2009

Execute function in RoutineBot

June 17th, 2009

Syntax
Execute( Path:String, Params:String [optional] )

Parameters

Path:String

string that specifies the file to execute. File can be executable file or some document.

Params:String [optional]

string that specifies the parameters to be passed to the application.

Return value

If file exists function returns 1, otherwise function returns 0.

Remarks

Function does not wait, before application will be closed.

Examples

open textfile
Execute('D:\SomeText.txt');
open notepad.exe
Execute('C:\WINDOWS\notepad.exe');
open file ‘D:\SomeText.txt’ in notepad
Execute('C:\WINDOWS\notepad.exe','D:\SomeText.txt');
Download example Execute

Reference
ShellExecute function

  • Share/Bookmark

Developer Articles

ListItem function in RoutineBot

June 17th, 2009

Syntax

ListItem( List:String, Index:String )

Parameters

List:String

String, that contains comma separated handles. You can get this string as result of function FindWindows.

Index:String

Index of item in string.

Return value

Return  the item located at the specified Index within List. If Index parameter is less than zero or greater than number of items in the string you get an exception. To obtain the number of items in string use function ListSize.

Example
s:='1,2,3';
a:=ListItem(s,0);
MsgBox(a);

Download example ListItem

  • Share/Bookmark

Developer Articles

ListSize function in RoutineBot

June 15th, 2009

Syntax
ListSize( List:String )
Parameters
List:String –

String, that contains comma separated handles. You can get this string as result of function FindWindows.

Return Value
Returns number of items in string. E.g. ListSize(‘5,6,7′) returns 3 and ListSize(”) returns 0.
Example

s := FindWindows('Opera');//searching browser handle
cnt := ToString(ListSize(s));
MsgBox('Found ' + cnt + ' handles');
s := '1,2,3';
cnt := ToString(ListSize(s));
MsgBox('Count of items in string ' + s + ' = ' + cnt);

Download example ListSize

  • Share/Bookmark

Developer Articles