Mouse and Key Recorder - Manual
(For Mouse and Key Recorder Version 4.5)
Internet: http://www.kratronic.com/recorder/
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
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")
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.
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.
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:
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.
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'.
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.
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.

![]()
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.

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)

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.

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.
![]()

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'
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.
![]()
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.
|
|
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.

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

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'.
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.
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.
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).
The Logging Function is a special function, which allows you to record all normal keystrokes to a text file. Normal keystrokes are all characters and all numbers, but no mouse clicks, cursor and Fnn keys. During the logging the 'Mouse and Key Recorder' is invisible. This function is very handy to log all your activities. This can be a big advantage if you loose a letter you have just written (e.g. WinWord crashed). In the logging file all the text you have written still exists.
To start the Logging Function you need to call the 'Mouse and Key Recorder' by a command line. Example:
"C:\Program Files\Recorder\Recorder.exe" D:\My Data\LogFile -LOGX4567 -BACKSPACE -EXIT:My73End
Parameters:
FileName
You need to enter a full path to your logging file. No extension is needed. The 'Mouse and Key Recorder' adds an extension .txt automatically.
-LOGX4567
This is the switch to enable logging. This parameter must be located immediately after the log-file name. (Separated by a space)
-BACKSPACE
When you add this parameter the backspace key deletes the last character. Only characters on the same line are deleted. Characters on earlier lines are not affected. Omit this parameter if you do not want backspace to affect your log file. Hint: The delete key does not delete any characters, even if this parameter is used.
-EXIT:
This parameter lets you define an exit word. When you type this word in any application the 'Mouse and Key Recorder' shows an exit window. When you click 'Yes' the Recorder exits. It is recommended to use an uncommon word for this parameter. Example: My73End88. Hint: The exit word must not be longer than 32 characters. Omit this parameter if you do not need an exit word.
The logging filename is created the following way:
The file name you defined in the first parameter. E.g. LogFile. Then date and time are added. Finally the extension .txt is added. A log file name could look the following way:
LogFile_2000.12.31_21.32.54.txt
Every time you start logging a new file name is used.
Hints:
The Mouse and Key Recorder contains lots of commands ({{If, {{Goto, etc), which allows to create quite complex macros. To make debugging easier the Mouse and Key Recorder contains a debug log file function. This function can be activated in the Tools / Help window. (Switch: 'Create Log-File'). This function forces the Recorder to write all activities to a file. The following entries are made to the Log-File:
- First line: Date and Time
- Second line: The original macro line
- Third to fifth line: Resolved macro lines. That means the content of the variables are shown.
The button: 'Open Log-File' allows opening the previous created log file.
After clicking the button 'Tools, Help..' the following window appears:

Keyboard Language:
This drop down menu lets you choose your keyboard language. About 28 languages are included in the installation. If your keyboard language is not included you can create your own language file. See chapter: 'Language Assignments'.
Order a licensed MKR:
This button opens an application, which lets you order a licensed 'Mouse and Key Recorder'.
Hotkeys:
The hotkey settings let you choose your individual hotkey for the 'Mouse and Key Recorder'. Default setting is: CTRL-ALT-SHIFT-F12. The hotkey can be used to enter delays and {{Switch commands. For delays see chapter: ' Recording macros'. The {{Switch hotkey works the following way: First you switch to your application by ALT TAB, then you press all together CTRL-ALT-SHIFT-F12 and then again F12. That way a {{Switch command is added to your macro. If you have changed the hotkeys to CTRL F3 you would press CTRL-F3 together and then F3.
Important: When you set the hotkey to just an Fn key without CTRL or ALT or SHIFT (Example: F12) then the hotkey works just for delays but not for entering {{Switch commands.
Activate Mouse Recording:
If you just want to record keyboard hits you can switch off the mouse recording here.
Remember Window Position:
The 'Mouse and Key Recorder' moves, after starting to the last place, where it was closed before. Here you can switch off this behavior.
Window Relative Mouse Recording:
This option allows you to activate windows relative mouse recording. See chapter: ' Mouse Entries' for a comprehensive description of absolute/relative mouse recording.
Use Rel. Window Filter:
A disadvantage of relative mouse recording is the need of the window name. The window name often changes (The window name often contains filenames or document names). Example: 'Document1 - Microsoft Word'. The relative windows filter allows to use just the real window names. In the above example this would be 'Microsoft Word'.
Edit Rel. Window Filter:
To be able to use the Relative Windows Filter, a filter file must exist. The 'Mouse and Key Recorder' contains such a file with the most used filenames. (MS Office, IE, Corel). This file is used the first time you install the 'Mouse and Key Recorder'. Later upgrades will not change the file you have already extended.
You can extend the filter file with pure window names. Every time the 'Mouse and Key Recorder' finds this pure name in the real window name it uses the name in the filter for the mouse or the (hotkey) {{Switch command.
Hints: Some Applications need more than the pure name. Example: Microsoft Outlook needs the following name: - Microsoft Outlook. (The pure name Microsoft Outlook causes an error in the 'Mouse and Key Recorder'.) When you enter a new name you should test if it works.
If you need to enter names that contain another name, you need to consider the sequence in the filter file. Example: 'Explorer' and 'PdmExplorer'. Place the longer name before the shorter one: In the above example: 'PdmExplorer' before 'Explorer'.
Open Manual:
Lets you open the 'Mouse and Key Recorder' manual.
Important Hints:
You should read them…
Load example:
Loads a simple calc and notepad example.
Check Focus Delay:
Lets you define the delay between pressing a focus button and the reading of the focus.
WaitForFocus Timeout
Lets you define the default value for the WaitFor(End)Focus timeout.
Focus Tolerance:
This value (pixel) is used to define the tolerances for catching the focus and to distinguish between a mouse click and a mouse drag.
Key-Codes
All the buttons below Key-Codes are described in chapter: 'Language Assignments'.
Macro Hotkeys
When you click: 'Edit Macro Hotkeys' you get the following window:

Adding new Hotkeys:
Use browse to select the macro. Adjust CTRL, Shift, Alt and the right key to your needs. Click Add.
Removing Hotkeys:
Select a line. Click Delete.
Activate option: 'Use Macro Hotkeys' to activate the hotkeys in the table.
The 'Mouse and Key Recorder' contains several commands, which allow you to use this Recorder for automated software tests. If you write software or macros for WinWord and Excel, you need to test your creation by carry out all possible functions with a lot of different entries and data. These tests can become quite large and time consuming. Even worse, if you change a small part of your software you should again test all the functions of your software. (Only that way you are sure, your new function has no bad side effects to already existing once.)
The following 'Mouse and Key Recorder' commands are handy for such automated software tests:
{{CheckFocus, {{WaitForFocus, {{WaitForEndFocus, {{Goto, {{Label, {{FindFile, {{Master, {{LoadMacro, {{WriteToFile, {{RandomNumber, {{RandomString, {{If..Then..Else, {{MessageBox2.
Let us assume a typical software test situation. The Recorder macro starts your application. (Assumption: Your application is a text editor) You want to be sure your application has started. So you check the actual focus. If the focus is on a wrong location, your application might have not started properly. Depending how you use this command the macro ends now or it jumps to a label. If you decide to jump to a label you could write some code, which sends a pager message to your pager. If your test runs for hours you can let your PC alone and you are alarmed, as soon the automated software test has found an error.
Assuming during your test you have written some text to your editor and you are going to store it now. Depending on the situation on your hard disk (file new or file already existing) different forms appear. Again you can use {{CheckFocus to test the situation and react according to the situation. The following script shows such a solution:
"{{Start notepad
Test
{ENTER}
%f {{' File
a {{' Save as
C:\RecTest\John.txt
%s {{' Save
{{Delay 1000}
{{If {{CheckFocus 82, -1, 95, 23, 3, 3, 3, 3} = {{True} ;%y;
%f {{' File
x {{' Exit
If this macro is run the first time, the file John.txt does not yet exist on the hard disk. That means {{CheckFocus will return False and nothing special is done. (no text after’;’) If John.txt already exists, {{CheckFocus returns a True and the command %y (Yes) is carried out.
Function description
{{CheckFocus
This function checks if the focus during the macro run is on the same location as it was when the macro was recorded. (The focused part in a window is that one which is addressed when you use the keyboard.)
You can add such a {{CheckFocus entry to your script by clicking the 'CheckFocus' button. After clicking the 'CheckFocus' button you must change to the application, which contains the focus to be tested within three seconds. This time (3 sec) can be changed in the Tool window. After the delay you get an entry similar to this one:
{{If {{CheckFocus 82, 288, 95, 23, 3, 3, 3, 3} = {{True};;{{ShowError}. The first four numbers stand for: Distance to the top border, to the left border, width of the part, height of the part. Example:

{{CheckFocus 63, 28, 81, 25. "Yes" has the focus. 63 pixel are between the top border and the button, 28 pixel between left border and button. The button has a size of 81 * 25 pixel.
This little window can be moved to any place on your desktop, you always get the same numbers. Restriction: Parts (example: Icons) on the desktop cannot be checked by {{CheckFocus. They have always the same numbers regardless of their position.
Sometimes the text in the window changes. Example:

Depending on the length of your path, the buttons move horizontally. You still can check the "Yes" button: {{CheckFocus 71, -1, 49, 25. The "-1" means: Do not test the distance to the left border.
The -1 can be used on any of the four numbers.
But what are we going to do if the buttons are arranged next to each other like in the next example ?

The solution are tolerances. You can define tolerances for every number. Example: {{CheckFocus 63, 105, 95, 23, 0, 20, 0, 0. That means the "Yes" button can move +- 20 pixels without causing an error. (100 pixels are about 3 cm or 1.2 inches on a 17’’ screen with a resolution 1024*768).
Sometimes the windows on your screen have some ‘jitter’. That means now and then they are drawn one pixel away from the recorded place. To overcome this behavior, the 'Mouse and Key Recorder' adds by default a tolerance of 3, 3, 3, 3 to your {{CheckFocus. You can adjust this value in the Help window. (Entry: Focus Tolerance). A ‘Focus Tolerance’ value of 0 means: No tolerances are added to the command.
If {{CheckFocus can’t find the part at the expected location it returns a "0". Within a {{If command you can test this with the key-word {{True} and {{False}. If you store the value of {{CheckFocus to a variable the "0" or "1" are stored. If you use the key-word {{ShowError} in the Then- or Else-part, then an error window is shown and the macro ends. (a ‘===>>’ is placed in front of the guilty command in the macro window. A second line shows the found coordinates). Example: {{If {{CheckFocus 455, 20, 73, 17, 3, 3, 3, 3} = {{True};;{{ShowError}.
{{WaitForFocus, {{WaitForEndFocus
{{WaitForFocus can be triggered by the button 'WaitForFocus', {{WaitForEndFocus can be triggered by the button 'WaitForEndFocus'.
The command {{WaitForFocus works very similar to {{CheckFocus. Additional to the four numbers a time-out time is added as fifth parameter.
Example: {{If {{WaitForFocus 63, 14, 95, 23, 10, 3, 3, 3, 3} = {{True};;{{ShowError}. The default value for the time-out can be set in the Help form. {{WaitForFocus waits for the focused window part during the time-out time. In the above example it waits for 10 seconds. If the required window part appears within the time-out time {{WaitForFocus returns a "1" (True). If the window part does not appear within the required time, {{WaitForFocus returns a "0" (False). {{WaitForFocus and {{WaitForEndFocus allow to use the -1 parameter and the above described tolerances.
{{WaitForEndFocus simply waits for an existing focused part to disappear. With this command it is possible to wait for the end of an operation.
Restrictions:
· Some applications have only one window, even though lots of buttons or icons appear. There the different Check-Focus functions cannot be used.
· The Check-Focus functions can also not be used on an Internet browser. Regardless of the content, the Check-Focus functions deliver always the same coordinates. For a workaround see: {{WaitForIEReady and Macro examples.
WaitForFocus Example:
Open the
Recorder. Open also Notepad manually (Start | Run | Notepad.exe). In the
Notepad click File | Open. In the new window click on button Open (to set the
focus on this button. The button gets a dashed frame.) On the Recorder click
button WaitForFocus. Within 3 seconds change to notepad by using ALT TAB. The
recorder asks now for a timeout. Set it to 100 and click ok. You get the
following macro: {{If {{WaitForFocus 322, 478, 75, 23, 100, 3, 3, 3, 3} =
{{True};;{{ShowError}. Add the command {{Beep to the macro (AddCommand,
{{Beep). Close the Open window of Notepad. Replay your macro. Nothing happens
now; just the timeout is counting down. In the Notepad click now File | Open.
In the new window click on button Open. At this moment you will hear a beep.
That means the Recorder has now sensed the right focus and continues..
That means to use this command you first must create the focus situation and
record it. Then during macro run the Recorder will wait until this focus
situation appears or the timeout time runs out.
{{MessageBox2
The normal {{MessageBox shows a window in the center of the screen. During software test, the screen is often filled by the software under test. The message box window appears then often beyond the other windows (especially when using Windows 98 / ME / 2000 / XP). The {{MessageBox2 appears always on top of the 'Mouse and Key Recorder'. (as long as the 'Mouse and Key Recorder' is visible)
{{MessageBox2 shows a text to the user. Example: {{MessageBox2 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 {{MessageBox2 a command {{Switch.... must follow, otherwise the Recorder will continue with the focus on itself !
{{MessageBox2} must not be used after a {{Minimize} command. Otherwise the MessageBox2-window cannot be closed anymore on certain operating systems.
The 'Mouse and Key Recorder' is installed with a number of keyboard language files. But only common languages are included. If your keyboard language is not included, you can create your own language file.
Procedure:
Copy the file Template.lng and give the new file the name of your language. (Example: Africaans.lng). Now click 'Tools, Help' in the 'Mouse and Key Recorder' and chose your new language file. After restarting the Recorder, you can open your file by clicking button: Show Key Assignment. Change the first line (Language=Template) to your language. Example: Language=Africaans.
The second line contains the entry: QuotationMark=å. This line allows you change the substitute for the quotation mark ("). If you want to use å as a normal character in your macros, choose another character as substitute for the quotation mark.
Find which keys are special. In most languages some keys have an odd behavior. When you press these keys nothing happens. When you press another key then the characters of both keys are shown. Example for these keys: ^ ~ ¨ ´ etc.
In the Key-Recorder Help window click the button: 'Show Key Codes' and then ‘Base’. Press all white keys. (Exceptions: The odd behavior keys.) Now open the key file (button: ‘Open Key File’) and copy the generated code. (Without title lines). Press button: ‘Show Key Assignment’. Paste the copied code above the line: ‘KeyAssignments’. Store the file and exit the Key-Recorder. Start again the Key-Recorder. Now click button ‘Tools, Help’ then 'Show Key Codes' and then ‘Shift-Alt’. Press again all keys as before but this time once with SHIFT and once with ALT Gr. Again open the key file and copy and paste the codes to the key assignment file after the line: ‘ShiftAltAssignments’.
Your language file is nearly finished. Now you have to enter the code for the odd keys. Use the button: 'Show Key Codes' to find the codes and enter them into your key assignment file. Put the Base Code (key without Shift or Alt) to the line after 'KeyAssignments’ and the Alt-Shift Code to the line after 'ShiftAltAssignments’. See next part if you have problems to create the entries.
The next part shows a more conventional way to create a language file. (Without using the ‘Base’ and the ‘Shift-Alt’ button). This part also describes more clearly how the code is structured.
In the Recorder Help window click the button: 'Show Key Codes'. Now press all keys on your keyboard: §,1,2,3...q,w,e...a,s,d...<,y,x,c... After you have pressed all keys, click the button: Open Key file. Now you can see all keys you have pressed. Example:
a 65 Result: a
s 83 Result: s
< 226 Result: \
- 189 Result: -
The first character is what your keyboard normally writes. The second value is the key code. The Result is the value that the 'Mouse and Key Recorder' will record. If the first and the third characters are the same, no action is necessary. If they do not fit, an entry to the new language file is necessary. Here code 226 is wrong. You would enter the following to the section 'KeyAssignments’:
226=<,FALSE
Syntax: 1st: Code no., 2nd: equal sign, 3rd: new character, 4th: TRUE for forcing a new line during recording, FALSE for not forcing a new line.
A few characters need special treatment:
The plus sign (+), caret (^), percent sign (%), tilde (~), parentheses ( ) Brackets ([ ]) and brace ({}).need to be enclose by braces. Examples: {+},{^},{%},{~},{(},{)},{[},{]},{{},{}}
If you need to define the comma (123=,,FALSE) you have to exchange the character comma by a '_comma_'. Example: 123=_comma_,FALSE
If you need to define a '=' (135==,FALSE) you have to exchange the character '=' by a '_equal_'. Example: 135=_equal_,FALSE
After you have changed your language file, check again for correctness.
Now do the same for all keys but combined with SHIFT. Example:
* 51 + Result: #.
The new '+' after the key code is a remark for SHIFT.
Again compare the first and the last character. If they are different you have to add a new line to the language file. All the SHIFT and ALT corrections have to be made in section: 'ShiftAltAssignments' Here you would enter:
#=*,+
Syntax: 1st: Result character, 2nd: equal sign, 3rd: Real character, 4th: + for SHIFT or % for ALT
Now do the same for all keys combined with ALT. (Use ALT GR to include all ALT characters)
Again a few characters need special treatment:
The plus sign (+), caret (^), percent sign (%), tilde (~),parentheses ( ) Brackets ([ ]) and brace ({}).need to be enclose by braces. Examples: {+},{^},{%},{~},{(},{)},{[},{]},{{},{}}
If you need to define the comma (\=,,+) you have to exchange the character comma by a '_comma_'. Example: \=_comma_,+
If you need to define a '=' (-==,+) you have to exchange the character '=' by a '_equal_'. Example: -=_equal_,+
After a check for correctness your new language file is ready for use. Maybe you want to share your work with others. If so, send the file by E-mail to me. I will then add your file to the installation of the 'Mouse and Key Recorder'.
"{{1}{{Start C:\WIN_APL\MSOFFICE\WINWORD\WINWORD.EXE
{{1}{{Delay 1500}
{{1}%d
{{1}fc:\Users\Krauer\WinWord6\E-Mail\E-Addr.Doc
{{1}{ENTER}
{{Delay 300}
+{END}
^c
{DOWN}
{HOME}
{{1}{{Start: C:\WIN_APL\E_MAIL\EMAILCON.EXE
{{1}{{Delay 1500}
{{1}{F2}
{{Switch E-Mail Connection
{{Delay 300}
^v
{ENTER}
{{Switch Microsoft Word
This macro opens WinWord during the first loop and loads an e-mail address list. Again only during the first loop the EMAILCON-application is started. During every loop an address is copied (CTRL C) from WinWord and then pasted (CTRL V) into the e-mail application.
The next example shows how the function GoSub can be simulated:
"{{SetVar1 1
{{GoTo Subroutine
{{Label GoOn1
{{SetVar1 2
{{GoTo Subroutine
{{Label GoOn2
{{Goto End
{{Label Subroutine
{{MessageBox Subroutine call no {{Var1}
{{goto GoOn{{Var1}
{{Label End
{{MessageBox Macro ends
Hint: For the next two examples, the command {{WaitForIEReady can be used (if you use MS Internet Explorer). For other browsers the two examples are still relevant.
Waiting for a text change in an Internet browser
{{SetString1
xx123xx67
{{Label Start
{{Delay 1000
{{RelativeDragMouse YourWebSite - Microsoft Internet Explorer, 1, 1, 457, 551,
0, 224, 551, 0
{{' Adapt
the {{RelativeDragMouse to your needs !
^c
{{If {{ClipBoard} = {{String1} ;{{Goto Start;
{{SetString1
{{ClipBoard}
{{Beep {{' Here you can add what you
need to do after the text appeared.
{{' …………………..
{{Goto Start
Function:
Every second a
certain browser location is selected and copied to the clipboard. This
text is compared with the text one second ago. As soon as the text changes a
beep is generated and the saved text is updated.
Waiting for a picture download in an Internet browser
{{Label
Start
{{Delay 1000
{{' Here you add the necessary steps to start the picture download
{{Label Start2
{{RelativeMouse
Microsoft Internet Explorer, 3, 1, 848, 372, 0 {{' Right mouse click on the
picture
a {{' Hotkey for save as
{{Delay 1000
{{If
{{CheckFocus 5, 3, 225, 14, 3, 3, 3, 3} = {{True};;{{Goto Start2
{{' The picture is here you can process it
{{Goto Start {{' Downloading the next picture
Function:
As long as the picture is downloading no 'save as' form appears. When the picture is here the form appears and the macro continues. Hint: You might need to re-record the {{CheckFocus command. This example was created on a Windows 2000.
During the installation the file "RecTest.zip" was installed to the directory you have chosen for the 'Mouse and Key Recorder'. You can extract the files in RecTest.zip archive to the directory C:\RecTest. The macros you find there have been used to test some aspects of the 'Mouse and Key Recorder'. The macros are written that way that they should work on all Operation Systems and all languages. Simply start the macro: "RTestMaster.krc". If you have extracted the files to C:\RecTest then all macros should be called automatically. Hint: The macros do not work if you have changed the default quotation mark character (å).
You can find an other small example when you click ‘Tools, Help’ and there ‘Load Example’.
Additional examples can be found on the Internet page: http://www.kratronic.com/recorder/faq.htm
{{Loop
{{Var1 {{Loop}
Important: Commands not used as parameters
and containing text must not close with a bracket. Examples:
{{SetString1} MyText
{{Switch Document2 Microsoft Word
Windows 2000 and XP have some new features. These features can influence the functionality of the 'Mouse and Key Recorder'.
Power Users and Restricted Users: The 'Mouse and Key Recorder' can only be installed on Windows 2000/XP by an administrator. If you need to work with the Recorder as a Restricted User, then the 'Mouse and Key Recorder' must NOT be installed in the directory 'Program Files'. Use another directory like MyOwnPrg.
If the 'Mouse and Key Recorder' was installed by another user, there is no Recorder icon in the Start menu. In this case please create an icon manually by clicking with the right mouse button on the program: 'Recorder.exe' and then choosing 'Create Shortcut'. After that copy the new shortcut to your desktop. (You can use the Windows Find function to find the program 'Recorder.exe')
Windows Focus: Windows 2000/XP has a new restriction. An application cannot put his window to the top anytime. (To protect the user of the annoying pop up windows). Only if you (or the 'Mouse and Key Recorder') have started the program, which wants to force a window to the top, the window will be allowed to the top. Solutions: Change the sequence of starting programs and do not minimize windows.
The 'Mouse and Key Recorder' is stored as *.ZIP file. (MouseAndKeyRec.ZIP) This ZIP file needs first to be extracted. You can find a very good ZIP Tool at: http://www.winzip.com
After downloading and extracting 'MouseAndKeyRec.ZIP' simply start the file: Setup.EXE. The installations program will lead you through the installation process.
It is recommended to un-install an existing 'Mouse and Key Recorder' if you want to upgrade it to a higher version. Procedure: Click Start, Settings, Control Panel, Add/Remove Programs (or Software if you use Windows 95). Choose 'Recorder' and click Add/Remove.
If you re-install the 'Mouse and Key Recorder' or upgrade it to a higher version (without a prior un-installation) the installation might ask you whether you want to keep old files. Answer 'No to All' to this question.
Hints: Your macros will not be deleted by a un-installation or a re-installation. Important: The language files will be replaced. If you have changed a language file you need to redo the changes after the upgrade. (If you send the corrections to me, I will include them to the installation.) The license is not removed during a un-installation and a new re-reinstallation.
Version 4.0 creates different Logging-file names. (V3.3: Day.Month.Year; V4.0: Year.Month.Day)
Version 3.3 restricts the size of a macro file to 32 KB. In older versions this size was between 32 KB and 40 KB depending of the used PC. If your macro is too large now, you need to divide it by using {{Master and {{LoadMacro.
The functionality between Version 2.5.3 and 3.0 has changed for the language files. If you have created your own language file or if you have changed an existing one, you cannot use them any longer. Please create a new one or redo your changes for 'Mouse and Key Recorder' V3.0. It would be a good idea to send your new / corrected language file to me, so I can include it for the next release.
Important: The language files are overwritten during each 'Mouse and Key Recorder' installation.
Version 3.0 switches off NumLock during replay. (Reason: Macro on Windows 95/98 runs faster). If you need to enter numbers in your application by using the NumPad, you have to force NumLock on by the command {{NumLockOn. Hint: The commands {{Ask and {{GlobAsk switch on NumLock automatically.
The command {numlock} is not any longer supported. It works only if before {numlock} a {{NumLockOn or {{NumLockOff was used.
The functionality between Version 2.02 and 2.5 has changed for comments. In version 2.02 a space before {{‘ was not killed, in Version 2.5 a space before {{‘ will be killed. Example: MyText {{‘ My comment. Results: V2.02: MyText |END, V2.5: MyText|END. If you have used comments not only at the beginning of a line and if you want to preserve the space you have to change from {{‘ to {{‘’. (Important: Use two apostrophes for {{'' and not a quotation mark)
Another change affects macros created with the 'Mouse and Key Recorder' Version 1.x. This version used colons after some commands. Example: {{switch: AnyAppl. This column is not any longer allowed. If you have worked with these old versions, you need to remove the colons after the commands. (Version 1.x was used only by a few users.)
In Version 2.5 and higher all commands used as a parameter must be closed by a ‘}’. Example: {{Start C:\File{{Loop}.txt. If one parameter is used and ‘}’ is missing then an error message is shown in V 2.5 and higher. If more than one parameter is used and only one has a missing ‘}’ then a wrong function will be carried out.
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'.
John Krauer, Kra-Tronic Corp. July 1st 2002