Mouse and Key  Recorder - Manual 

(For Mouse and Key  Recorder Version 4.5)

 

Internet: http://www.kratronic.com/recorder/

 

Download this Manual

 

Content List

 

1     Introduction__________________________________ 2

2     'Mouse and Key Recorder' Requirements___________ 2

3     Licenses_____________________________________ 3

4     Functions____________________________________ 3

5     Working with 'Mouse and Key Recorder'___________ 4

5.1      Important Hints____________________________ 4

6     Recording macros______________________________ 4

7     Your first 'Mouse and Key Recorder'  Macro________ 5

8     Function Description__________________________ 5

8.1      Main Window and Key Entering_______________ 5

8.2      Loading and Storing Macros__________________ 7

8.3      Start or Switch to an Application_______________ 7

8.4      Loops____________________________________ 7

8.5      Adding Commands_________________________ 8

8.6      File Import_______________________________ 16

8.7      Editing Macros___________________________ 17

8.8      Delays and Postponed Starting_______________ 17

8.9      Language Setting__________________________ 18

8.10    Mouse Entries____________________________ 18

8.11    Status Information_________________________ 19

8.12    Command Line Function____________________ 19

8.13    Calling a Macro by a Hotkey________________ 20

8.14    Creating a 'Mouse and Key Recorder' icon_____ 20

8.15    Logging Function_________________________ 20

8.16    Debug-Log-File___________________________ 21

8.17    Tools/Help Window________________________ 21

9     Special Functionality: Automated Software Test___ 23

10       Language Assignments______________________ 25

11       Macro Examples____________________________ 26

12       Hints / Limitations__________________________ 28

12.1    Windows 2000 and Windows XP______________ 29

13       Installation________________________________ 29

14       Upgrade Installation________________________ 29

15       Upgrade Information________________________ 29

16       Disclaimer_________________________________ 30

 

 

 

1     Introduction

 

A long, long time ago, when Windows 3.1 still was in favor, we all had access to a tool called Recorder. This recorder was able to record and replay keystrokes and mouse clicks.

That way simple macro files could be recorded. By double clicking on an icon, an application could be started and certain actions within this application could be carried out.

When Windows NT and Windows 95 arrived, the recorder disappeared without any trace.. The only way to use a batch file now was DOS !

The new 'Mouse and Key Recorder' for Windows NT 4.0/2000/XP and Windows 95/98/ME, written by John Krauer, fills this painful gap. The next picture shows this new tool.

 

 

(If the button "Record" has the focus, it changes its text to  "Recording")  

 

2     'Mouse and Key Recorder' Requirements

 

Operating System:

The 'Mouse and Key Recorder' runs on the following operating systems:

 

Resolution:

The 'Mouse and Key Recorder' needs a screen resolution of at least:

If you want to use large fonts in your screen settings, then a resolution of 768 x 1024 is required.

 

To work on a screen with a smaller resolution a program for virtual screens could be used. These programs allow to have up to 2'500 screens. An application, which is too large, simply occupies two virtual screens. Here two addresses for such programs:

http://www.enablesoftware.com/  (Virtual Desktop)

 

Hard disk and RAM:

The 'Mouse and Key Recorder' needs about 4 MB hard disk space and works with at least 8 MB RAM.

 

3     Licenses

 

The 'Mouse and Key Recorder' is a shareware program. That means you can test this program for 3 month. After that time you must buy a licensed version. With the test version you cannot store any macros to the disk anymore after three months. The licensed version can be bought over the Internet.  Address:

http://www.kratronic.com/recorder/

 

A single license for the 'Mouse and Key Recorder' costs 23 US$. (Site license: 100 US$, World wide license: 300 US$)

License Terms:

A single license is meant for one PC only.

A site license is meant for a single unit of a company. A company unit can have several buildings in a city. To use the 'Mouse and Key Recorder' in different branches (normally located in different cities) a worldwide license is needed.

The site license and the worldwide license allows to use the 'Mouse and Key Recorder' on every PC on this site or worldwide in this company. (But not outside the company).

 

The state of your Mouse and Key Recorder (Test-Version or Licensed Version) is shown in the header of the Tools/Help window.

 

4     Functions

 

The 'Mouse and Key Recorder' is able to record mouse clicks and keystrokes and to replay them. But this is only the core function. There is much more:

 

5     Working with 'Mouse and Key Recorder'

 

The'Mouse and Key Recorder' records, as the name expresses, mouse clicks and keystrokes.

The "old" Recorder (Windows 3.1) had no edit functionality. If a wrong key was pressed, the whole recording had to be repeated. The 'Mouse and Key Recorder' records all keystrokes and all mouse clicks within any application (exception: DOS Boxes). The recorded macro can then be stored, edited and replayed. About 70 additional commands lets you master nearly every task you want to automate.

 

5.1     Important Hints

 

The 'Mouse and Key Recorder' is a powerful tool. As with every powerful application, care has to be taken using it. The 'Mouse and Key Recorder' replays all commands you have stored to the macro file. The Recorder does not check automatically if the situation is the same you had, when you recorded the macro. That means if the Recorder gets ‘out of synchronization’ some damage could be done. In this situation wrong menu are clicked, OK is pressed for ‘wrong’ commands, and so on..

How can you avoid such uncomfortable and even dangerous situations ? Here some hints what you should do:

 

The 'Mouse and Key Recorder' has been tested to the best of our abilities for bugs. The author of 'Mouse and Key Recorder' is not responsible for any damage that may incur to the user's system or data as a result of using 'Mouse and Key Recorder'.

 

6     Recording macros

 

After starting the 'Mouse and Key Recorder' you get a window shown at the beginning of this manual. Normally you want to carry out actions on applications like Microsoft Word, Excel, E-Mail etc. That means first you need to add a command to start (or switch to) the needed application. To do so press the button: 'Add Command'. Type in Switch 1)  or Start. The 'Mouse and Key Recorder' presents you a hint, a description of the syntax and a short help about that command. Complete the command and press OK. Now click the button 'Record' to activate key and mouse recording. Important: Switch now to your application by using ALT TAB. ALT TAB is not recorded by the 'Mouse and Key Recorder'. Operate your application. You can use keystrokes, mouse clicks (all three buttons), mouse double clicks, dragging mouse. Some actions you do need some time. The 'Mouse and Key Recorder' records your keystrokes without any timing information. (Means your macro will run much faster than you type). As a result you need to include delays. This can be done by a hot key: CTRL SHIFT ALT F12 and then one of the keys 0..'m'. Assignments: 1: 300 ms, 2: 500 ms, 3: 750ms, 4: 1min, 5: 2min, 6: 5min, 7: 10min, 8: 15min, 9: 50min, 0: 1hour; q: 1sec, w: 2sec…..o: 9sec; p: 10sec; a: 11sec, s: 12sec….l: 19sec; y/z: 21sec, x: 22sec….m: 27sec.

Finish your work by switching back to the 'Mouse and Key Recorder' using ALT TAB. Click button Recording to stop the recording mode.

If you need to edit your macro you click the button 'Edit Macro'.

You can find a comprehensive description of all functions in chapter: 'Function description'.

Hint: The Mouse and Key Recorder treats keystrokes and mouse clicks differently. Keystrokes wait for the application. That means a second keystroke is sent not until the first keystroke is processed by the application. Mouse clicks are sent according to the speed set in the Recorder. That means, working with mouse clicks needs a more careful delay management (enough delay between each mouse click)

 

1)  To add a Switch command you can also use CTRL-ALT-SHIFT-F12  F12. See also command description {{Switch.

 

7     Your first 'Mouse and Key Recorder'  Macro

 

This chapter gives you a first impression how easy it is, to create a macro by using the 'Mouse and Key Recorder'.

 

Try the following steps:

 

 

And now… Click 'Replay' and see what the Mouse and Key Recorder does for you….

If it was too fast for you, change the General Line Delay to 2000 and click Replay again.

 

8     Function Description

 

8.1     Main Window and Key Entering

 

 

 

The main window shows the recorded or loaded macro. To record keys, the button "Record / Recording" must be pressed. You cannot write directly to the main window! Only keys pressed with an active button "Record / Recording" will be replayed and stored to files. The keys, and commands are automatically scrolled through the main window. If the switch "Auto Scroll" is put to off, the whole macro can be viewed by using the vertical scrollbar.

 

While pressing keys the following commands are added to the macro:

 

Key                             Code

characters like Abc     Abc

BACKSPACE             {BACKSPACE}, {BS}, or {BKSP}

BREAK                       {BREAK}

CAPS LOCK              {CAPSLOCK}

DEL                            {DELETE} or {DEL}

DOWN ARROW        {DOWN}

END                            {END}

ENTER                       {ENTER}

ESC                            {ESC}

HELP                          {HELP}

HOME                         {HOME}

INS                              {INSERT}

LEFT ARROW           {LEFT}

PAGE DOWN             {PGDN}

PAGE UP                    {PGUP}

 

RIGHT ARROW         {RIGHT}

SCROLL LOCK         {SCROLLLOCK}

TAB                             {TAB}

UP ARROW               {UP}

F1                               {F1}

F2                               {F2}

F3                               {F3}

......

F11                             {F11}

F12                             {F12}

 

ENTER on NumPad   {{NumPadEnter}

 

When you want to use CTRL character, SHIFT character or ALT character, type them in as usual. ‘Mouse and Key  Recorder’ adds the right commands.

 

Key                             Code

SHIFT                         +

CTRL (CONTROL)    ^

ALT                             %

 

Example: +^h = Shift Control h, +^%{F1} = Shift Control Alt F1

 

Some characters are treated specially in the 'Mouse and Key Recorder'. These characters are:

The plus sign (+), caret (^), percent sign (%), tilde (~),parentheses ( ) Brackets ([ ]) and brace ({}). All these characters need to be enclosed by braces. {+},{^},{%},{~},{(},{)},{[},{]},{{},{}}

The quotation mark (") acts as a control character in a file. Therefore it is replaced by another character. Example: (å)

 

Hints

 

By default the 'Mouse and Key Recorder' records both, mouse clicks and keystrokes. If you just want to record the keystrokes it is possible to switch off the mouse recording in the Tools window (Click button ' Tools, Help')

 

During recording you can add a delay command by using a hot key (CTRL SHIFT ALT and then a number between 0 and 'm'). If the default hot key does interfere with your application you can change it in the Tools window. Delay key assignments: 1: 300 ms, 2: 500 ms, 3: 750ms, 4: 1min, 5: 2min, 6: 5min, 7: 10min, 8: 15min, 9: 50min, 0: 1hour; q: 1sec, w: 2sec…..o: 9sec; p: 10sec; a: 11sec, s: 12sec….l: 19sec; y/z: 21sec, x: 22sec….m: 27sec.

 

8.2     Loading and Storing Macros

 

 

Load and Store 1..7 are short-term memories. The short-term memory files are located in the same directory as the 'Mouse and Key Recorder' is stored (Filenames: Krauer1.krc...Krauer7.krc). The button "..." shows a list of all existing short-term memories (macro description). The "8th button" in the Store area is a switch. If this switch is on, 'Mouse and Key Recorder' asks before it overwrites an old short-term memory. The two large Load and Store buttons allow to store and load files with regular filenames. (Extension: .krc)

 

8.3     Start or Switch to an Application

 

 

The 'Mouse and Key Recorder' always works on other applications. Therefore it has to switch to another application or to open a new application. To switch to an application the name of the application as it appears by pressing ALT TAB has to be put into the line: "Application Name".

Example: Document2 - Microsoft Word. Often Microsoft Word is enough to be able to switch.

If an application should be started the whole path has to be entered. Example: C:\PROGRAMS\MSOFFICE\WINWORD\WINWORD.EXE.

If the Application Name Window is empty, no switch or start is carried out.

Starting or switching to an application as described in this chapter is only carried out once after starting the macro. If you want to start or switch to applications during the macro run, you need to use the commands: {{Start or {{Switch.

The ‘Macro Description’ shows the description after loading a macro. During run of a macro the ‘Macro Description’ text changes to ‘Current Command’ and the edit-box shows every one and a half second the command currently processed.

 

8.4     Loops

 

 

Often an activity has to be repeated several times. Example: Copying content of 100 E-Mails to a WinWord document. The Loop Macro control lets you set how many times the macro is repeated. In this example the whole macro is run 5 times. Sometimes certain activities should be carried out only at the first or at the last loop. The following commands allow doing this:

{{1}Start C:\MSO\Word.exe.   Here WinWord is started only during the first loop

{{n}%fe.                      Only during the last loop WinWord is closed

{{3}I'm line three         Only during loop 3 the text is written.

{{<10}Filename00       Always during loops lower than 10

 

Sometimes the loop number should be used. Example: You want to open File1.txt, then File2.txt... For that purpose you can use: {{Loop}. This command adds the loop number.

Example: {{Start Notepad.exe File{{Loop}.txt.

If your files start at 101 you can use an offset.

Example: {{Offset 100}. During the first run file101.txt will be opened.

Another often-needed function is to go up or down with the cursor for a certain amount. Example: During every loop the cursor should be put down one time more. The following command lets you do this: {{DownLoop. During loop 1 the down cursor is activated once, during loop 2 the down cursor is activated twice... The command {{RightLoop does the same but moves the cursor to the right.

 

8.5     Adding Commands

 

 

 

The button 'Add Command' opens a Command-Input window. Here special commands can be chosen. After clicking on one of the commands, the command is entered in the lowest edit field, the second text field tells you what has to be added, and the third field sometimes gives you some hints. If the check box ‘Add’ is marked, every chosen command is added to the already existing once in the edit field.

The 'Add Command' window has a further built in automation. You can start to enter a command (example: setg..) The marker in the list jumps to the appropriate line. With a CTRL M the command is filled in. As soon as you check ‘Add’ the same process is started for the second command. (Example: {{SetGlobVar1} {{lo...  . This automation has a side effect. The cursor key does not work properly any more. If you want to use the cursor key (to enter text in the middle of a line) you can switch off the automation by the key CTRL N.

If a command requires a path and filename a further button (Browse) appears. The path and filename chosen by browsing is then added to the lowest edit field.

Hint: If you add a command-line without {{ at the beginning of the line then all special characters like [, ], +, %, ^ … are converted for output ( {[}, {]}, {+}, {%}, {^}..)

 

Hints: Spaces in the commands (see examples) are important. If you omit them,  you will get error messages.

 

 

Using parameters in commands

The 'Mouse and Key Recorder' lets you use certain commands as a parameter for other commands. Example: {{Start {{String1}. The command {{Start starts an application. The variable {{String1} contains the file name. More Examples:

Rules:

{{If {{FindFile {{String1}} = {{True} ;;{{ShowError}

{{SetGlobString1} {{RandomNumber {{Var1}, {{Var2}}.

{{CR} and {{LF} can be used as often as you want it in a line.

 

Important: Commands not used as parameters and containing text must not close with a bracket. Examples:

{{SetString1} MyText  

{{Switch Document2 Microsoft Word

 

 

Here a description of all the available commands:

 

{{' Text, {{'' Text

Lets you enter a comment. Comments can be entered anywhere in a command line. All text after {{' or {{‘’ will be ignored. Important: All text before a {{‘’ will be used. Example: {DELETE}  {{‘’ delete this line. Result: The marked line will be deleted but you get two additional spaces ! If you do not want the additional spaces use {{‘ delete this.... The command {{‘ kills all spaces before {{‘

Hint: Do not use quotation marks. ("), use two apostrophes for the command {{'' Text

 

{{Start

Lets you start an application. You need to enter the full path and the filename. Exception: If your application is covered by your environment variable 'Path=', only the application is necessary. Example: {{Start Notepad.

Hints: If you need to define the working directory, carry out {{SetWorkingDir before you use {{Start.

{{Start can only start files with the extension .exe, .bat, .com.

For data files like .doc the filename can be added (as command line) to the application path. Example: {{Start åC:\Program Files\Microsoft Office\Office\WINWORD.EXEå D:\MyDocuments\MyWordFile.doc

Another way is to start the application (here MS Word). Then load the .doc file by the appropriate commands (ALT File….)

 

{{SetCurrentDir

Some applications need the right working directory for a proper function. Often the load and store function uses the working directory as a default location.

Example: {{SetWorkingDir C:\Programs\Office. Result: The next {{Start or {{SwitchOrStart command uses 'C:\Programs\Office' as working directory.

 

{{DOS

Lets you carry out a DOS command. Example: {{DOS del c:\myFile.txt. Important: {{DOS does only support 8.3 paths and filenames. (Max. 8 characters for the filename, max 3 characters for the extension.) Use the normal Recorder file commands if you need to delete / rename / copy files with long filenames. Normal Recorder file commands: {{CopyFile, {{DeleteFile, {{RenameFile.

 

{{Switch

Lets you switch to another application. Use the name you find when you press ALT TAB. You can use only a part of the name, but that part must be unique and a whole word. Example: Alt Tab Text: Recorder2000.doc - Microsoft Word. Switch command: {{Switch Microsoft Word. Sometimes also the dash (- Microsoft Word) is needed. You might need to experiment what Windows accepts.

Hint: The {{Switch command removes leading and tailing spaces. If you want to keep these spaces, place the command {{KeepSpace before the {{Switch command.

Hint:

{{Switch is a command, which is needed quite often. Therefore the 'Mouse and Key Recorder' offers a second way (Hotkey) to add switch commands. Procedure: Switch to your window by using ALT TAB. Press the following keys all together: CTRL-ALT-SHIFT-F12 and then again F12. A {{Switch command is added to your macro. It is possible to change the hotkey and to filter the window names. See chapter 'Tools/Help Window' for more information.

 

{{SwitchOrStart

This command first tries to switch to an application window. If the application window does not exist, the command starts the application. Example: {{SwitchOrStart Microsoft Word | C:\Programs\Office\Word.exe. If WinWord is open the 'Mouse and Key Recorder' switches to it, otherwise it starts the application.

Hint: The {{SwitchOrStart command removes leading and tailing spaces. If you want to keep these spaces, place the command {{KeepSpace before the {{SwitchOrStart command.

See also {{Start for additional options

 

{{Loop}

Lets you output the loop number. Remark: One Loop is always a fully repeated macro. The amount of Loops can be set on the Recorder form (Loop Macro). Example:

{{Switch Microsoft Word

This is loop number {{Loop}

Keep in mind: The command {{Loop is not a Loop-construct like in VisualBasic. To repeat a macro you need to set the number of repetitions in the edit-window 'Loop Macro' at the bottom of the 'Mouse and Key Recorder' Window.

The command {{Loop is just used to output the actual Loop number. (Number of repetition)

 

{{Offset 100}

Adds an offset to the loop number. Example: {{Offset 100}: The first loop will enter (above example): This is loop number 101

 

{{1}

All commands after {{1} will only be carried out during the first loop.

Hint: An offset is taken into account in this command. The offset is added to the actual loop. Example: {{Offset 5: In this case the first run has already Loop no 6 and therefore a command after {{1} will never be carried out.

 

{{8}

All commands after {{8} will only be carried out during the eighth loop.

Hint: An offset is taken into account in this command. The offset is added to the actual loop Example: {{Offset 5: During real loop 3 the command after {{8} will be carried out.)

 

{{<8}

All commands after {{<8} will only be carried out during all loops less than 8 (1, 2, 3.. 7).

Hint: An offset is taken into account in this command. Example: {{Offset 5: A command after {{<8} will be carried out during real loop 1 and 2 corresponding to 6 and 7)

 

{{>8}

All commands after {{>8} will only be carried out during all loops higher than 8 (9, 10, 11, etc.).

Hint: An offset is taken into account in this command. Example: {{Offset 5: A command after {{>8} will be carried out during real loop 4, 5, 6 etc. corresponding to 9, 10, 11, etc.)

 

{{n}

All commands after {{n} will only be carried out during the last loop.

Hint: An offset is NOT taken into account in this command. {{n} is always carried out during the last loop regardless of the content of offset.

 

{{Beep}

This command produces a sound. {{Beep} can be used to inform you that the macro has ended.

 

{{MessageBox

{{MessageBox shows a text to the user. Example: {{MessageBox Please insert data floppy. {{CR} Floppy must not be write protected !

The {{CR} keyword allows you to show more than one line for the text. Important: After the command {{MessageBox a command {{Switch.... must follow, otherwise the Recorder will continue with the focus on itself !

 

{{Stop}

When the Recorder comes across a {{Stop} a window is shown which gives you the possibility to continue immediately, to stop, to continue with the next loop or to continue with the next {{Master} command.

Hint: If you want to be able to continue you must place a {{Switch-command after {{Stop}. Reason: Stop places the focus to the Recorder window.

Important: {{Stop} must not be used after a {{Minimize} command. Otherwise the Stop-window cannot be closed anymore on certain operating systems.

 

{{Exit}

Closes the 'Mouse and Key Recorder'. If a change was made on the macro, the Recorder first asks whether this macro should be saved. This function is especially handy if you start a macro by command line (example: by icon). An {{Exit} at the end of the macro causes the 'Mouse and Key Recorder' to disappear after the task is done.

 

{{Var1}

{{GlobVar1}

Lets you use variables. Variables must be set by {{SetVar.. or {{SetGobVar.. before you can use them.

Example for Var: {{Var5}: The content of variable 5 will be written.

{{Var-variables are stored together with the macro to a file, {{GlobVar-variables are stored only once. That means you can use the same global variable in all your macros.

You can use as many variables as you want. Example {{Var56345}.

If you use a variable not yet set you get a zero as result. If you omit the number ( {{Var} ) then {{Var0} is used.

 

{{SetVar1}

{{SetGlobVar1}

Lets you set variables. Example: {{SetVar15} 25: Variable 15 will be set to 25. You can also use decimal values: {{SetGlobVar15} 12.5. Important: Only numbers can be stored by variables, no string (text) is possible. For decimal values only a dot is allowed as decimal point. If you omit the number ( {{SetVar} ) then {{SetVar0} is used.

 

{{IncVar1},  {{IncGlobVar1}

{{DecVar1},  {{DecGlobVar1}

{{MulVar1},  {{MulGlobVar1}

{{DivVar1},  {{DivGlobVar1}

Lets you change your variables. Examples:

{{IncVar1} 5: adds 5 to the variable 1

{{DecGlobVar1} 5: subtracts 5 from the global variable 1

{{MulVar1} 10: Multiplies variable 1 by 10

{{DivVar1} 10: Divides variable 1 by 10

 

{{String1}, {{GlobString1}

Lets you use string variables. String variables must be set by {{SetString.. or {{SetGlobString.. before you can use them.

Example for string: {{String5}: The content of string variable 5 will be written.

{{String-variables are stored together with the macro to a file, {{GlobString-variables are stored only once. That means you can use the same global variable in all your macros.

You can use as many variables as you want. Example {{String56345}.

If you use a variable not yet set you get a zero as result. If you omit the number ( {{String} ) then {{String0} is used.

 

{{SetString1}, {{SetGlobString1}

Lets you set string variables. Example: {{SetString15} My Text: String variable 15 will be set to ‘My Text’. If you omit the number ( {{SetString} ) then {{SetString0} is used.

Carriage Returns and Line Feeds can be added to your string by using the two key words: {{CR} and {{LF}. These two characters are handy if you want to compare text containing more than one line. Example: {{SetString1} Line one{{CR}{{LF}Line two. An empty string ("") can be set by using the constant: #emptyX5#. Example: {{SetString1} #emptyX5#.

 

{{Ask1},  {{GlobAsk1}

{{WriteAsk1},  {{WriteGlobAsk1}

{{Ask1} lets you enter a text while the macro runs. This text is then used by the command {{WriteAsk1}.

Example: {{Ask3} Please enter your name. {{CR} Don’t forget your first name |Peter Miller

The {{CR} keyword allows you to show more than one line for the prompt. The text after the separator (|) is used as default value. (The default value is optional, you can omit it.)

{{Ask-variables are stored together with the macro in a file, {{GlobAsk-variables are stored only once. That means you can use the same global ask-variable in all your macros.

You can use as many ask-variables as you want. Example {{Ask56345}.

If you use an ask-variable not yet set, you get a zero as result. If you omit the number ( {{Ask} ) then {{Ask0} is used.

Hint: NumLock is switched on for {{Ask and {{GlobAsk automatically.

Important: {{Ask and {{GlobAsk place the focus on the Recorder window. If you want to be able to write again to your application you need to add an {{Switch command after {{Ask or {{GlobAsk.

 

{{SetClipBoard}

{{ClipBoard}

{{SetClipBoard} lets you write text from the macro to the clipboard. Example:{{SetClipBoard MyText{{CR}{{LF}MyText second Line.

{{SetClipBoard is also needed if you want to use {{RandomString with special characters. Further on {{SetClipBoard can be used to write commands to a DOS box. (ALT space | Edit | Paste)

{{ClipBaord} works the same way as CTRL V for outputting text to an active window. {{ClipBoard} can also be used to put text from a clipboard to a variable. Example: {{SetString1} {{ClipBoard}

Important: When using the command {{Clipboard, the clipboard must not contain braces {}, otherwise an error is shown.

 

{{DownLoop}

{{UpLoop}

{{RightLoop}

{{LeftLoop}

These commands let you move the cursor depending on the loop number. If loop 5 is carried out, the cursor is moved 5 times up (or down, or right, or left). You can add a number to theses commands. Example: {{RightLoop 5}. Result: For every loop the cursor is moved 5 places to the right. That means: When the loop counter including {{Offset contains a 7, the cursor is moved 35 places to the right.

 

{{DownVar}

{{UpVar}

{{RightVar}

{{LeftVar}

These commands let you move the cursor depending on the content of a variable. Examples: {{DownVar {{Var1}, {{RightVar {{RandomNumber 1,10}. You can also use a number in place of a variable. Example: {{RightVar 15}. Result: The cursor is moved 15 places to the right.

 

{{DateTime}

Sometimes you want to store lots of files during every loop. The command {{DateTime} produces a text like this: 1998-12-13-23-51-12. Every second you get a different text.

 

{{Date-}

The command {{Date- produces a text like this: 1998-12-13. Every day you get a different text.

 

{{ExtDelay}

The 'Mouse and Key Recorder' contains already an command {{Delay. This Delay can be set by the button 'Insert Delay'. This Delay has the unit ms (milliseconds). For larger delays large numbers have to be entered.

Extended Delay allows you to enter a delay in a more natural way.

Syntax: {{ExtDelay Days:Hours:Minutes:Seconds. 

Example: {{ExtDelay 10:23:59:40}. The resulting delay is: 10 days, 23 hours, 59 minutes and 40 seconds. Other examples: {{ExtDelay 10:15}  = 10 minutes, 15 seconds. {{ExtDelay 15}  = 15 seconds. Maximum delay: 3650 days.

 

{{RandomNumber

This command creates a random number. {{RandomNumber needs two parameters: Lower border and Higher border. The number you get will be between the two numbers (including the borders). Example: {{RandomNumber 100, 200}. Possible result: 126

 

{{RandomString

This command creates a random string. {{RandomString needs three parameters: Number of characters, Lower border, Higher border. The string you get will be "No of char" long and the characters will be between the two borders (including the borders).. Example: {{RandomString 12, a, z}. Possible Result: rhnqlkddcyhu. The command {{RandomString works with the ASCII table. That means you get the following characters outside 0..9, A..Z and a..z: !..0 = !"#$%&’()*+,-./0 9..A = 9:;<=>?@A Z..a = z[\]_`z..~ = {|}~ . If you want to have all small letters and all capital letters in your sting you can use the following parameters: {{RandomString 12, az, a}. Possible Result: UOTliVOdGnyo.

Important: If you want to write characters outside of 0..9, a..z and A..Z you must use the following clipboard-technique: (Necessary because the random string can contain characters the Recorder can not handle with its output technique)

{{SetClipBoard {{RandomString 20, !, ~}

^v

 

{{ImportFile

{{ImportSeparator

{{DoImport}

{{ImportNextLine}

This commands allow to use "records" in a file to be put to the target application. See chapter: ‘File Import’ for an exact description.

 

{{If

This command lets you compare values and strings. Syntax: {{If Expression Condition Expression; Then-action; Else-action. Example: {{If {{Var1} = 5;{{Switch Microsoft Word;{{Switch Microsoft Excel. Result: If variable 1 contains a 5, the Recorder switches to Word. If variable 1 contains any other number than a 5 the Recorder switches to Excel.

Other (WRONG) example: {{If {{String1} = My Text ;TextIsTrue;TextIsFalse. Here you get an error because no space is allowed in an expression. Solution:

{{SetString2} My Text

{{If {{String1} = {{String2} ;TextIsTrue;TextIsFalse

The same solution ({{SetString2) must be used if the following characters are within the string: =, <, >, <=, >=, <>.

It is also possible to compare a text with the content of the clipboard. Example: {{if {{ClipBoard} = MyText ;;!!Text is not identical!!

{{IfSep, {{GlobString1} <> {{String1},Text: Name; Address; City = wrong,OK.

In the above example a comma is used as separator, therefore a ‘;’ can be used in the text.

{{If {{WriteAsk1} = x ;{{Ask1 Enter a valid text. x is not allowed as entry;

Important:

 

{{FindFile

This command searches for a file. Example: {{FindFile c:\MyText.txt. If the file exists, {{FindFile produces a "1" if the file does not exist you get a "0". You can use this command together with {{If. Example: {{If {{FindFile C:\MyProgram.exe} = {{True};{{Start C:\MyProgramm.exe;{{Goto Error.

 

{{CompareFiles

This command lets you compare files. If the files are identical, 'CompareFiles' produces a "1" if the files are not identical you get a "0". You must use this command together with {{If. Example: {{If {{CompareFiles C:\MyFile1.txt | C:\MyFile2.txt | 10000} = {{False} ;{{DeleteFile C:\MyFile2.txt; Result: If the two files are different (False) the file 2 is deleted.

The number after the two filenames defines how many bytes are compared. If the number is shorter than the file size only the defined amounts of bytes are compared. If the number is larger than the file size, the whole files are compared.

 

{{CheckWindow

This command lets you check the existence of an application window. Example {{CheckWindow 'Mouse and Key Recorder'. If the window exists the Recorder switches to this window and writes a one, if the window does not exist the Recorder writes a zero. The window name is the same you find when you press ALT TAB. You can use only a part of the name, but that part must be unique and a whole word. Example: Alt Tab Text: Recorder2000.doc - Microsoft Word. Switch command: {{Switch Microsoft Word. Sometimes also the dash (- Microsoft Word) is needed. You might need to experiment what Windows accepts.

Normally {{CheckWindow is used together with a {{If command. Example:

{{if {{CheckWindow Mouse and Key} = {{True} ;{{Goto RecExist;{{Goto RecNotExist

 

{{CopyFile

This command lets you copy (and the same time rename) files.

Example {{CopyFile C:\My Documents\ReadMe.txt | C:\Your Documents\Hints.txt.

Always a full file name including path is needed. (Wildcards are not possible)

 

{{RenameFile

This command lets you rename (and move) files.

Example {{RenameFile C:\Data\ReadMe.txt | C:\Data\Hints.txt.

If your paths are different the file is also moved to the destination path. Always a full file name including path is needed. (Wildcards are not possible). It might not be possible to use different drives for source and destination file. (Operating System depending)

 

{{DeleteFile

This command lets you delete files.

Example {{DeleteFile C:\Data\ReadMe.txt. No error is shown, if the file does not exist.

Always a file path is needed. (Wildcards are possible. Example: {{DeleteFile C:\Data\*.txt)

 

{{Goto

If the 'Mouse and Key Recorder' comes across a {{Goto MyLabel it jumps to the {{Label MyLabel. The {{Goto function can be used for the proper reaction of different situations during macro run. {{Goto allows jumping forward and backward in a macro.

The 'Mouse and Key Recorder' does not contain a GoSub. But this commend can easily be simulated. See chapter 'Macro Examples' for a solution.

 

{{Label

Label are needed for the commands {{Goto. They are the targets for these jumps. Example: {{Label MyLabel. Please notice, that no colon (:) is necessary after the label. Labels are case sensitive. That means myLabel is not the same as MyLabel.

 

{{Master}

The {{Master} command allows to load and run several macros in succession. Example:

{{Master}

{{LoadMacro C:\MyMacros\Macro1.krc

{{LoadMacro C:\MyMacros\Macro2.krc

Result: Macro1 is loaded and started. When Macro1 has finished macro2 is loaded and started. All valid commands (except {{Master itself) are possible after {{Master.

Restrictions: A master-macro can not use loops higher than 1. After a {{Master no {{GoTo is possible in the macro containing the {{Master} command.

Important: Normal variables must not be used in a macro containing a {{Master command and a {{LoadMacro. You need to use {{GlobVar, {{GlobString, {{GlobAsk in this case.

 

{{LoadMacro

This command loads another macro and starts it immediately. Example {{LoadMacro C:\Data\Recorder\MyMacro.krc. This function allows breaking down a large macro in smaller parts. Smaller parts can be maintained more easily. Important: A single macro must not be larger than 32 KB.

Hint: The command {{Master} allows to call all your parts from a master macro.

 

{{WriteToFile, {{WriteLineToFile

Allows you to write text to a file. Example: {{WriteToFile C:\MyFile |MyText. {{WriteToFile writes to one line (without carriage return), {{WriteLineToFile adds a carriage return after the text end. These two commands can be used to write comments to a file (Macro logging).

 

{{Minimize}, {{Normalize}

These two commands allow to minimize the 'Mouse and Key Recorder' to the taskbar or to bring it back to the normal size.

See also chapter 'Command Line Functions' for a minimized start of the Mouse and Key Recorder. (MKRMinimize)

Important: A {{Normalize} without a preceding {{Minimize} places the 'Mouse and Key Recorder' in the center of the screen.

Do not show {{Stop or {{MessageBox2 while minimized !!! On certain operations systems you can NOT close these windows any more.

 

{{SetIndex1}, {{Index1}

This command gives you the opportunity to use an ‘indirect addressing’ for your variables. Example:

{{SetIndex1} 55

{{Var{{Index1}}

The Recorder replaces {{Index1} during the macro run with it’s content. Result: {{Var55}. In other words: In this example {{Var{{Index1}} will send the content of {{Var55} to the active application.

You can use 10 different indexes ({{Index0}..{{Index9}. The command {{Index can be used at any place where a variable number is necessary. (Var, Globvar, SetVar, String, SetString, Ask, WriteAsk...).

The {{Index-values are not stored to a file. That means you loose them as soon as the macro ends.

Hint: The command {{Index is a legacy command. The actual 'Mouse and Key Recorder' version can use any variable for an indirection. Example:

{{SetVar1} 55

{{SetVar55} 33

{{Var{{Var1}}

 

{{NumLockOn}, {{NumLockOff}

'Mouse and Key Recorder' V3.0 and higher switches off NumLock automatically during macro run.  When the macro ends the original state is restored. Switching off NumLock speeds up macro replay considerably on Windows95 and 98. If you need to have NumLock enabled during your macro run you can force on/off the NumLock by {{NumLockOn} / {{NumLockOff}.

Hint: Switching on or off NumLock needs some time. (Especially on Windows NT4.0 / 2000 / XP). Add a {{Delay if you want to switch on and off NumLock shortly after each other.

 

{{SetGenDelay

{{SetGenDelay overwrites the General Line Delay set in the 'Mouse and Key Recorder' window. This command is especially handy for debugging. It lets you 'slow down' parts of the macro.

Hint: {{SetGenDelay used in a {{Master macro (containing {{LoadMacro) will take effect until all loaded macros have ended.

 

{{WaitForIEReady

WaitForIEReady allows waiting for an Internet page to be fully downloaded. Example:

{{If {{WaitForIEReady 10} = {{True} ;{{Goto OK;{{Goto error. If the page download needs more than 10 seconds, the macro jumps to the label error, otherwise to the Label OK. If no Internet Explorer is open, a False is returned. {{ShowError} can be used in the True-action or False-action part. {{ShowError} causes the macro to show an error and to end.

Additional Information: This command can only be used for Microsoft Internet Explorer V4.0 or higher. The Command does not work with Netscape or other browsers.

Recognizing the end of an Internet page download is tricky. Especially if frames are used in the page, the WebBrowser Object delivers a signal for every frame. Sometimes the ready signal appears for a short time between the individual frames. To overcome these problems the WaitForIEReady command checks the ready signal 8 times (with a delay of 0,15 sec between each try.) If these 8 loops are too less (or too high) the number of loops can be set.

Example: {{If {{WaitForIEReady 10,30} = {{True} ;{{Goto OK; {{ShowError}. In this example 30 loops are used. This needs 4,5 sec time.

Hint: If several Internet Explorer are active, then WaitForIEReady waits until all Explorers are ready.

 

 

More commands

More commands (especially useful for software testing) can be found in chapter: 'Special Functionality: Automated Software Test'

 

8.6     File Import

 

The three commands: {{ImportFile, {{ImportSeparator and {{DoImport} allow you to use text stored in a file. Example: You want to open 100 files by your graphic application and you want to print them out by night. By using the DOS command dir /b > file.txt you create a file containing all filenames. By using 'loop macro' and {{Start C:\MyGraphicApp {{DoImport} you can open your graphic application with all the 100 files...

Principle: A line in the ImportFile can have several fields seperated by the {{ImportSeparator. Every {{DoImport during a macro loop run reads one of the fields. ({{DoImport 1: First field, {{DoImport 2: Second field, etc.) An ImportFile can have several lines. Every macro loop run processes one line. (Loop 1: Line one, Loop 2: Line two, etc.)

 

Command description

{{1}{{ImportFile C:\MyFileName.Txt. This command defines which import file you want to use. Important: Use always an {{1} (or any other number) to ensure that the import file is loaded only once. You can of course use more than one ImportFile.  Example: {{50}{{ImportFile.. After 50 loops another import file is used

The import file has the following format:

You can use as many records and as many lines as you want. The command {{ImportSeparator defines what separator is used between the records. (Default: comma).

Example: {{ImportSeparator @}. Hint: At the end of the line you have the option to use or not to use a separator.

The command {{DoImport} puts the appropriate record to your target application. If you use {{DoImport too often in a line, no error appears, but you get empty strings as a result. Hint: An empty string ("") can be tested by the constant: #emptyX5#. Example: {{If {{Var1} = #emptyX5#. ;{{Beep;

 

How it works:

During loop one, Record_a1 is used when the first {{DoImport} appears. The second {{DoImport} in the same loop uses Record_a2... etc.

During loop two, Record_b1 is used when the first {{DoImport} appears. The second {{DoImport} in the same loop uses Record_b2... etc.

 

Additional command:

In Version 4.3 the command {{ImportNextLine} was added. This command allows you to read the next line in an ImportFile without using Loops. Example:

{{ImportFile c:\MyList.txt

{{Label Start

{{MessageBox {{DoImport}

{{If {{ImportNextLine} = {{True} ;{{Goto Start;{{Goto End

{{Label End

The command {{ImportFile already reads the first line. So the command {{MessageBox shows the first field. {{ImportNextLine} then opens the next line. (If there is no next line the Recorder jumps to the Label End)

If {{ImportNextLine} is used without {{If an error is shown if more lines than existing are read.

Hint: If you use {{ImportNextLine} a Loop change does not any longer switch to the next ImportFile line. That means you can use {{ImportNextLine} and Loops together.

 

 

8.7     Editing Macros

 

 

It is possible to edit a recorded macro. To edit a macro press the button "Edit Macro". After pressing this button, a small editor with the actual macro is opened. The editor supports the following hotkeys:

CTRL C/X and CTRL V for copy/cut and paste. CTRL SHIFT HOME/END for selecting the whole text.

The editor contains also a Find (Hotkey: F3), a Find Again (Hotkey: F4) and a font-size functionality.

To simplify the entry of commands the hotkeys F9 ={{',  F11={{  and F12=}  can be used.

Debugging Help: If a macro has an error the guilty line is shown with a ===> in the macro window. After opening the editor, the cursor is placed at this guilty line. An abort (or {{Stop) produces also a ===>. That means you can abort a macro at a critical situation and the editor will show you the location where you stopped.

 

When editing a macro, you need to stick to certain rules:

The plus sign (+), caret (^), percent sign (%), tilde (~), parentheses ( ) Brackets ([ ]) and brace ({}).need to be enclose by braces.

To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses.  For example, to specify to hold down SHIFT while E and C are pressed, use "+(ec)".  To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+ec".

To specify repeating keys, use the form {key number}.  You must put a space between key and number.  For example, {LEFT 42} means press the LEFT ARROW key 42 times; {h 10} means press h 10 times.

The commands {{1}, {{2}...{{n} have to be placed at the beginning of a line. All other commands can be placed after {{1}, {{2}...{{n}.

Commands which deliver an output (Examples: {{Var1}, {{RandomNumber 1,10} etc.) can be placed anywhere in a line. Commands not delivering an output needs to be placed at the beginning of a line. (Or after {{1}, {{2}...{{n}) Examples: {{SetVar1 10}, {{WriteLineToFile C:\Temp.txt, myText.

 

Hint: Additional quotation marks (") entered in the editor are automatically changed to the substitute quotation mark (Normally: å). This character can be changed in the language assignment. See chapter: Language assignments.

 

8.8     Delays and Postponed Starting

 

 

 

Hint: The two delays have a resolution of 55 ms. That means if you set a delay of 10 ms the 'Mouse and Key Recorder' anyway waits 55 ms.

The "Start Macro at" switch allows to schedule the run of a macro. This function can be used to start a large print job in the middle of the night, when nobody is disturbed by a long printout. Example: Day = 2, Hour = 03, minutes = 15.  Replay pressed at Monday 18:15. Macro starts Wednesday night at 03:15. (Days change at midnight.)

If you want to start a macro periodically you can use an external scheduler and call the 'Mouse and Key Recorder' by command line. See chapter Command Line function.

 

8.9     Language Setting

 

 

'Mouse and Key Recorder' can work with 28 different keyboards (Languages). When you start the 'Mouse and Key Recorder' the first time after installing, no language is set. (The US-English is used by default). The 'Mouse and Key Recorder' ask then to choose a language. The chosen language is shown in the 'Keyb. Language' group. The 'Keyb. Language' group also allows to change 'on the fly' between the chosen language and an English keyboard.

If your keyboard language is not included in the 28 keyboard languages, you can create a language file yourself. See chapter: Language assignment.

 

8.10     Mouse Entries

 

The 'Mouse and Key Recorder' offers two different ways to record mouse clicks:

 

Absolute Mouse Recording: In this mode all mouse clicks are stored related to the full screen. Mouse clicks are always on the same place on the screen, regardless of the location of the existing windows.

 

Relative Mouse Recording: In this mode the mouse clicks are stored relatively to the application window. That means a click on the Microsoft Word File menu will hit the file menu always, regardless where the Microsoft Word window is located on the screen and how large it is. Additional to the mouse coordinates the application window name is also stored to the macro. During macro run, the 'Mouse and Key Recorder' first switches to the window and then applies the mouse click. That means in the Relative Mouse Recording mode the window name must be the same during macro recording and macro run. Chapter 'Tools/Help Window' shows a way to ease this hard requirement. (Relative-Window-Filter) This chapter shows also how to switch between the absolute and relative mode.

Hints: Some applications get the focus too late after a mouse click. For these applications you get a wrong (or none) window name. When this happens a sound is played. Recommendation: Switch to the window by ATL TAB before you apply a mouse click.

Some Option windows (like the Tools,Help Window in the 'Mouse and Key Recorder') need the parent window name for access. In the above example this would be 'Mouse and Key Recorder'.

If the window name contains a comma the relative mouse recording can not be used. Use absolut recording instead.

 

The Mouse and Key Recorder records just the mouse clicks and not the entire movement of the mouse-way. This makes the macro shorter and easier to edit. If you want to place the mouse without a click switch on the option: 'Suppress clicking for single clicks and drags' in the following window. By using this option, recorded mouse clicks produce just a mouse positioning, mouse drags produce a smooth cursor slide from the starting to the end point (without any clicking).

 

Usually, mouse clicks are recorded live by clicking the button 'Record', and carrying out the necessary mouse clicks and drags. The 'Mouse and Key Recorder' uses the settings in field 'Focus Tolerance' (Form: Tools, Help) to distinguish between clicks and dragging. The default is 3 pixels.

It is possible to deactivate mouse click recording (just the key strokes are then recorded). To deactivate mouse click recording click the 'Tools,Help' button and switch off the option 'Activate Mouse Recording'.

 

If you have deactivated mouse recording, and you want to add just one or two mouse clicks, you can use the following form:

 

 

 

When the button 'Add Mouse Clk' is pressed, this form appears. This form allows choosing mouse buttons and number of clicks. If a comment is entered, this comment is then added before the mouse-command to the macro. After pressing OK, the command is added to the 'Mouse and Key Recorder' main window. Example:

{{Mouse  3, 2, 430, 283, 0,+^%

3 = right button (1 = left button), 2 = double click, 430 = pixel horizontal, 238 = pixel vertical, 224788663 = Window ID, + = SHIFT, ^ = CTRL, % = ALT

If you activate 'Drag and drop' The 'Mouse and Key Recorder' asks for two mouse coordinates. When replaying the macro the mouse is then dragged from the first coordinate to the second one.

Placing or sliding the cursor without clicking:

Activating the option: 'Suppress clicking for single clicks and drags' produces commands for just placing the cursor without clicking. (This option is also valid for mouse clicks recorded live.) Resulting command: (Example) {{Mouse  1, 1, 430, 283, 1.

The above option works also for dragging the mouse. Example: {{DragMouse  1, 1, 82, 64, 1, 584, 774, 1. The cursor slides smoothly from location 82, 64 to 584, 774 within about 1 sec. The speed of the cursor can be changed from 2 (2% of the original speed) to 10'000 (100 times faster than the original speed). Example {{DragMouse  1, 1, 82, 64, 1, 584, 774, 50  = 50% of the original speed.

 

8.11     Status Information

 

 

At the bottom of the 'Mouse and Key Recorder' form, some status information can be found. There is a command counter, a status line and a loop counter.

The loop counter allows repeating the content of the main window. The loop counter can be set to the required amount of loops. The whole macro is then repeated that many times. (All commands starting with a {{1}, {{2}... {{n} are processed only once.)

The button "Clear Screen" deletes the content of all windows except the field 'Macro description'.

 

8.12     Command Line Function

 

The 'Mouse and Key Recorder' allows the use of command line parameters. The following command-line starts 'Mouse and Key Recorder', loads the macro "MyMacro" and starts the macro:

"C:\Program Files\Recorder\RECORDER.EXE" "C:\My Documents\MyMacro.krc". This function allows starting a macro by an icon. This feature can be used if an application needs certain adjustments every time it is started. (In example: Setting a special font and layout). How to create an icon: On the desktop right mouse click, NEW, SHORTCUT, enter the above (or any) command line, then the name of the icon.

If you want to keep the 'Mouse and Key Recorder' in the background during the macro run you can set the window size to minimized in your icon.

If you want to start the Mouse and Key Recorder by command line without an icon and keep it in the background you can add the command line option: -MKRMinimize  (Option is case sensitive). Example: "C:\Program Files\Recorder\RECORDER.EXE" "C:\My Documents\MyMacro.krc -MKRMinimize".

 

The command line functionality also allows starting a macro by an external scheduler. All Windows operating systems except Windows 95 already contain a task scheduler. (See Windows help for details). You can also use any scheduler you find in software archives. (Example: www.download.com).

 

Command Line Variable Parameters

 

It is possible to hand over Command Line variable parameters ({{Var and {{String) to a macro. The following parameters are possible: --Var0, --Var1 … --Var9   and   --String0, --String1 … --String9

Example: "C:\Program Files\Recorder\RECORDER.EXE" "C:\My Documents\MyMacro.krc --Var1 4711 --String2 My Text".

The automatically started macro 'MyMacro.krc' can now use the variables {{Var1 and {{String2.

Important: The file name must always be the first parameter in a Command Line.

 

 

8.13     Calling a Macro by a Hotkey

 

There are two possible ways to start a macro be a hotkey. The first way starts the Mouse and Key Recorder and the macro by a command line in an icon. The icon itself contains a hotkey. The second way uses a built in hotkey table.

 

First way:

To start the 'Mouse and Key Recorder' by a hotkey, an icon as described in the previous paragraph 'Command Line Function' has to be created. The property sheet of this icon contains a line where a hot-key can be defined. Hint: These hotkeys just work if the icon is located on the desktop.

 

Second way:

The Tools/Help.. Window contains a button: 'Edit Macro Hotkey'. This button lets you define hotkeys. (See Chapter: 'Tools/Help Window' for a comprehensive description of the hotkey creation.) The option: 'Use Macro Hotkeys' must be enabled to use the hotkeys defined in Edit Macro Hotkey. Hint: Theses 'second way hotkeys' just work when the Mouse and Key Recorder runs.

 

 

8.14     Creating a 'Mouse and Key Recorder' icon

 

The previous two sections mentioned the creation of a 'Mouse and Key Recorder' icon. Here is the procedure:

Click on your PC desktop with the right mouse key and choose New and then Shortcuts. An icon wizard is started. Fill in the command line as described in chapter 'Command Line Function'. Choose a proper name for your new icon. After finishing the icon wizard, click with the right mouse key on the new icon. On tab Link enter your desired hot key combination and the state of the 'Mouse and Key Recorder' after starting (minimized, normal).