Archive

Archive for July, 2009

Unit restriction in RoutineBot 2.0

July 27th, 2009

As RoutineBot uses FastScript as script engine, there are 2 restrictions:

1.  If you use units in you project, you must use quoted names in uses-decalartion.

E.g.  in PascalScript these syntax is invalid:

uses unit1;

instead use syntax

uses 'unit1';
2. Unit structure must be same as default script. E.g. in pure Pascal structure of unit is
Unit unitname;
interface
function, procedures,constant and other declarations
implementation
realization of function and procedures declared in interface section
end.

In PascalScript you must use these syntax for units
function unitfunction1 : integer;
begin
realization of unitfunction1
end;
function unitfunction2 : string;
begin
realization of unitfunction2
end;
procedure unitprocedure3;
begin
realization of unitprocedure3
end;
begin

initialization io unit
end.


Here you can download example unit.

  • Share/Bookmark

Developer Uncategorized

New languages in RoutineBot

July 27th, 2009

Starting version 2.0 RoutineBot supports two additional script languages – JScript (language with javascript-like syntax) and BasicScript (language with basic-like syntax) and the Pascal syntax supported from the very beginning of the project.

All old function (e.g. MouseFocuse,EnterKeys) are available under all three languages.

You can change  used language from combobox above script source.

Language selection
Default language is PascalScript.
Below are showed script in different languages, that works identically.
#language PascalScript
i := 2;
while i > 0 do
begin
MsgBox('i = ' + i);
i := i - 1;
end;

#language JScript
i = 2;
while (i > 0)
{
MsgBox("i = " + i);
i = i - 1;
}

#language BasicScript
i = 2
while (i > 0)
MsgBox("i = " + i)
i = i - 1
wend

And now you can automatically convert numerical values to string values. E.g. expression

'Image # ' + 1

return string value

'Image # 1'

  • Share/Bookmark

Developer Official , , , , ,

Browse and click menu commands of tested application

July 11th, 2009

Starting version 1.6 RoutineBot can click on certain menu commands in tested application. The process is now automated to make it easy to find necessary menu name, address to it and click it.

The step-by-step it looks like:

  1. Run RoutineBot and go to the Tools > Menu Browser. As as result you will have a list of all menus avaliable in the system right now sorted by application.

    The menu browser in RoutineBot - select menu item and click it automatically

    The menu browser in RoutineBot - select menu item and click it automatically

  2. Find the menu you need and click OK.
  3. In your script will be added the code like this:

ExecuteMenuItem(‘notepad.exe’,'New’);

This code will click on “New” menu in running notepad.exe.

Known limitations:

  • The function will ExecuteMenuItem will work only with default system menues, if application use some custom designed menu, it will not work;
  • The ExecuteMenuItem command addresses the menu by menu name and application name, so if there are more than two applications with the same .exe name are running, then RoutineBot will execute action for the first application only
  • Share/Bookmark

admin Articles , ,