1     Mouse and Key Recorder - Manual 

 

1.1     Mouse and Key Recorder

 

Manual for 'Mouse and Key Recorder' Version 6.6

 

Further information about the Mouse and Key Recorder can be found in the Internet:

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

(Copy this link to the Internet browser to open the manual there)

 

Download this Manual  (MS Word 97/2000/XP/2003 Format)

 

How to save the Manual: Click the right mouse button on the above link and choose save.

If this does not work, then click on the above link. Your HTML Help window shows the manual after a while.. Now use 'CTRL a' to select the text, 'CTRL c' to copy the text, open an empty Word document and use 'CTRL v' to paste the Manual to the Word document. Now save or print it.

 

 Content

 

1     Mouse and Key Recorder - Manual.. 1

1.1       Mouse and Key Recorder.. 1

1.2       Introduction.. 4

1.3       'Mouse and Key Recorder' Requirements. 5

1.4       Licenses. 6

1.5       Functions. 6

1.6       Working with 'Mouse and Key Recorder' 7

1.6.1   Important Hints. 7

1.7       Recording macros. 8

1.8       Your first 'Mouse and Key Recorder'  Macro.. 8

1.9       Function Description.. 9

1.9.1   Macro Window and Key Entering. 9

1.9.2   Loading and Storing Macros. 12

1.9.3   Start or Switch to an Application. 12

1.9.4   Loops. 12

1.9.5   Adding Commands. 13

1.10     All Commands. 15

1.10.1     Command Descriptions. 15

1.10.1.1   {{' Text, {{'' Text 15

1.10.1.2   {{SendTextSpecial}, {{SendTextNormal}. 15

1.10.1.3   {{WindowsAeroOff}, {{WindowsAeroOn}, 16

1.10.1.4   {{GetAeroState. 16

1.10.1.5   {{Start, {{StartAndWait 16

1.10.1.6   {{SetCurrentDir 16

1.10.1.7   {{DOS. 17

1.10.1.8   {{Switch. 17

1.10.1.9   {{SwitchOrStart 18

1.10.1.10     {{Loop}. 18

1.10.1.11     {{SetLoop. 18

1.10.1.12     {{Offset 100}. 18

1.10.1.13     {{1}. 18

1.10.1.14     {{8}. 18

1.10.1.15     {{<8}. 18

1.10.1.16     {{>8}. 19

1.10.1.17     {{n}. 19

1.10.1.18     {{Beep}. 19

1.10.1.19     {{MessageBox. 19

1.10.1.20     {{FlashBox. 19

1.10.1.21     {{ShowInfo. 19

1.10.1.22     {{WaitForKey. 20

1.10.1.23     {{Stop}. 20

1.10.1.24     {{Exit}. 20

1.10.1.25     {{Var1}, {{GlobVar1}. 20

1.10.1.26     {{SetVar1}, {{SetGlobVar1}. 20

1.10.1.27     Increment, Decrement, Multiply and Divide. 20

1.10.1.28     {{String1}, {{GlobString1}. 21

1.10.1.29     {{SetString1}, {{SetGlobString1}. 21

1.10.1.30     {{Ask1},  {{GlobAsk1}, {{WriteAsk1},  {{WriteGlobAsk1}. 21

1.10.1.31     {{SetClipBoard}, {{ClipBoard}. 22

1.10.1.32     {{DownLoop}, {{UpLoop}, {{RightLoop}, {{LeftLoop}. 22

1.10.1.33     {{DownVar}, {{UpVar}, {{RightVar}, {{LeftVar}. 22

1.10.1.34     {{DateTime}. 22

1.10.1.35     {{Date}. 22

1.10.1.36     {{Time}. 22

1.10.1.37     {{SerialTime}. 22

1.10.1.38     {{Delay}, {{ExtDelay}. 23

1.10.1.39     {{WaitForTime. 23

1.10.1.40     {{RandomNumber 23

1.10.1.41     {{RandomString. 23

1.10.1.42     {{ImportFile, {{ImportSeparator, {{DoImport}, {{ImportNextLine}. 23

1.10.1.43     {{If 23

1.10.1.44     {{FindFile. 24

1.10.1.45     {{CompareFiles. 24

1.10.1.46     {{CheckWindow.. 25

1.10.1.47     {{ScanDirectories. 25

1.10.1.48     {{CreateDir 25

1.10.1.49     {{DeleteDir 26

1.10.1.50     {{CopyFile. 26

1.10.1.51     {{RenameFile. 26

1.10.1.52     {{DeleteFile. 26

1.10.1.53     {{Goto. 26

1.10.1.54     {{Gosub, {{Return}. 26

1.10.1.55     {{Label 27

1.10.1.56     {{LoadMacro. 27

1.10.1.57     {{Master}. 27

1.10.1.58     {{WriteToFile, {{WriteLineToFile. 27

1.10.1.59     {{Minimize}, {{Normalize}. 28

1.10.1.60     {{SetIndex1}, {{Index1}. 28

1.10.1.61     {{NumLockOn}, {{NumLockOff}. 28

1.10.1.62     {{SetGenDelay. 28

1.10.1.63     {{WaitForIEReady. 28

1.10.1.64     {{SetIEFocus. 29

1.10.1.65     {{WaitForScreenChange. 29

1.10.1.66     {{GetPixel 29

1.10.1.67     {{RGB.. 30

1.10.1.68     {{FindPattern. 30

1.10.1.69     {{GetWindowPos. 33

1.10.1.70     {{GetCursorPos. 33

1.10.1.71     {{Decode. 33

1.10.1.72     {{Sort 34

1.10.1.73     More commands. 34

1.10.2     Special Commands. 34

1.10.2.1   {{CTRL, {{Shift, {{Alt 34

1.10.2.2   {{CTRL+/-, {{Shift+/-, {{Alt+/- 34

1.10.2.3   {{Space. 35

1.10.2.4   {{CR}, {{LF}, {{Tab}. 35

1.10.2.5   {{MouseDownTime. 35

1.10.2.6   {{KeyDownTime. 35

1.10.2.7   {{MacroPath. 35

1.10.2.8   {{AppDataPath}. 35

1.10.2.9   {{AppPath}. 35

1.10.2.10     {{FileSize. 35

1.10.2.11     {{WindowsKey. 35

1.10.2.12     {{NoFocus. 36

1.10.2.13     {{GetWindowName}. 36

1.10.2.14     {{CapsLockOn}, {{CapsLockOff}. 36

1.10.2.15     {{DebugOn}, {{DebugOff}. 36

1.10.2.16     {{ResetLogFile}. 36

1.10.2.17     Mathematical and string commands. 36

1.10.2.18     {{Power 37

1.10.2.19     {{Mod. 37

1.10.2.20     {{Div. 37

1.10.2.21     {{IsNumeric. 37

1.10.2.22     {{Len. 37

1.10.2.23     {{InStr 37

1.10.2.24     {{Mid. 37

1.10.2.25     {{Left 37

1.10.2.26     {{Right 37

1.10.2.27     {{Trim.. 38

1.10.2.28     {{Ucase. 38

1.10.2.29     {{Lcase. 38

1.10.2.30     {{Chr 38

1.10.2.31     {{Asc. 38

1.10.2.32     {{Replace. 38

1.10.2.33     {{Calc. 38

1.10.3     File Import 41

1.11     Editing Macros. 43

1.11.1     Command Delays. 43

1.11.2     Delayed Macro Start 44

1.11.3     Scheduled Macro Start (Scheduled Tasks) 44

1.11.4     Mouse Entries. 46

1.11.5     Status Information. 48

1.11.6     Command Line Function. 48

1.11.7     Calling a Macro by a Hotkey. 49

1.11.8     Creating a 'Mouse and Key Recorder' icon. 49

1.11.9     Logging Function. 50

1.11.10   Debug-Log-File. 51

1.11.11   Debug Window.. 51

1.11.12   Options. 51

1.12     Help Menu.. 56

1.12.1     Macro List 56

1.13     Debugging.. 57

1.14     Special Functionality: Automated Software Test. 58

1.14.1     Function description. 59

1.14.1.1   {{CheckFocus. 59

1.14.1.2   {{WaitForFocus, {{WaitForEndFocus. 60

1.14.1.3   {{MessageBox2. 61

1.15     Keyboard Language. 61

1.16     Macro Examples. 61

1.16.1     Examples for individual commands (or command groups) 62

1.16.1.1   Comments. 62

1.16.1.2   {{SendTextNormal}, {{SendTextSpecial}. 62

1.16.1.3   {{Start, {{StartAndWait 62

1.16.1.4   {{DOS. 63

1.16.1.5   {{Switch, {{SwitchOrStart 63

1.16.1.6   {{Loop. 64

1.16.1.7   {{WaitForKey. 65

1.16.1.8   {{SetVar, {{Var, {{SetString, {{String. 65

1.16.1.9   {{Ask, {{WriteAsk. 66

1.16.1.10     {{SerialTime. 67

1.16.1.11     {{ImportFile, {{ImportSeparator, {{DoImport}, {{ImportNextLine}. 67

1.16.1.12     {{ScanDirectories. 68

1.16.1.13     {{Gosub. 69

1.16.1.14     {{Master 69

1.16.1.15     {{WaitForIEReady. 70

1.16.1.16     {{GetPixel 70

1.16.1.17     {{CheckWindow.. 71

1.16.1.18     {{Sort 71

1.16.1.19     Mathematical commands. 72

1.16.1.20     {{Text-Commands. 72

1.16.2     Examples for solving general tasks. 73

1.16.2.1   Example for repeating the whole macro or parts of it 73

1.16.2.2   {{If command with several commands for 'then' and 'else' 73

1.16.2.3   Waiting for the download of an Internet page by Firefox. 74

1.16.2.4   RandomString using self defined characters. 74

1.16.2.5   Using several Hotkey Sets. 75

1.16.2.6   Further examples. 75

1.17     Hints / Limitations. 76

1.18     Installation.. 78

1.18.1     PC independent installation. 79

1.19     Upgrade Installation.. 79

1.20     Upgrade Information.. 79

1.21     Disclaimer.. 80

 

 

 

1.2     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 was DOS ! Later on VBS (Visual Basic Scripting) appeared, but VBS is much too complicated for everyday macros.

 

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

 

 

 

 

1.3     'Mouse and Key Recorder' Requirements

 

Operating System:

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

 

For Windows 95 and Windows NT 4.0. the older 'Mouse and Key Recorder' version V4.5 must be used.

Internet Explorer 5.0 or higher must be installed on the PC.

 

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 you to have up to 2'500 screens. An application, which is too large, simply occupies two virtual screens. Here an address for such a program:

http://enablevirtualdesktop.com/virtualdesktop/index.htm   (Virtual Desktop)

 

Hard disk and RAM:

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

 

 

1.4     Licenses

 

The 'Mouse and Key Recorder' is a shareware program. That means you can test this program for 3 months. 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/tools/recorder/

 

A single license for the 'Mouse and Key Recorder' costs $23.00 (US). (Site license: $100.00 (US), World wide license: $300.00 (US)

 

License Terms:

·         A single license is meant for one PC only.

 

The state of your Mouse and Key Recorder (Test-Version or Licensed Version) is shown in the About Box. (Menu: ‘?’)

 

 

1.5     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:

 

 

1.6     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. More than 140 additional commands lets you master nearly every task you want to automate.

 

 

1.6.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 previously, when you recorded the macro. That means if the Recorder gets ‘out of synchronization’ some damage could be done. In this situation, wrong menus are clicked, OK is pressed for ‘wrong’ commands, and so on..

How can you avoid such uncomfortable and even dangerous situations? Here are some hints on 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'.

 

 

1.7     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 tab 'Macro Code' then button ‘Insert 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 'Append Recording' (red dot) 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 'Append Recording' to stop the recording mode.

If you need to edit your macro you click the register tab 'Macro Code'.

You can find a comprehensive description of all functions in Chapter 8: 'Function Description'.

Hint: In the Normal-Text-Mode the Mouse and Key Recorder treats keystrokes and mouse clicks differently. Keystrokes wait for the application. That means a second keystroke is sent but not until the first keystroke is processed by the application. (This is not any longer true for Windows Vista/Win7) 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). Conclusion: Use Normal-Text-Mode keystrokes (and not mouse clicks) when ever possible (in Windows XP and earlier).

 

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

 

 

1.8     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:

 

 

Now change 'Line Delay' (in Tab 'General') to 1000 and click 'Play' (blue triangle) and see what the Mouse and Key Recorder does for you…

After that you can reduce the value of 'Line Delay'. But, if you choose a too short time, errors might occur. (Mouse clicks are delivered faster than the word processor can process them)

 

 

1.9     Function Description

 

1.9.1     Macro Window and Key Entering

 

 

The macro window shows the recorded (or loaded) macro. To record keys, the button 'Append Recording' must be pressed. Keys pressed with an active button 'Append Recording' will be shown in this window and can later be replayed and stored to macro-files. The recorded keys, and commands are automatically scrolled through the macro window.

 

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

 

Key

Code

characters like Abc

Abc

BACKSPACE

{BACKSPACE}

BREAK

{BREAK}

CAPS LOCK *)

{CAPSLOCK}

NUM LOCK *)

{NUMLOCK}

SCROLL LOCK *)

{SCROLLLOCK}

PRINT SCREEN *)

{PRTSC}

SHIFT  *)

{SHIFT}

CTRL   *)

{CTRL}

ALT *)

{ALT}

 

 

DEL

{DELETE} or {DEL}

END

{END}

ENTER

{ENTER}

ESC

{ESC}

HELP

{HELP}

HOME

{HOME}

INS

{INSERT}

DOWN ARROW

{DOWN}

LEFT ARROW

{LEFT}

PAGE DOWN

{PGDN}

PAGE UP

{PGUP}

RIGHT ARROW

{RIGHT}

UP ARROW

{UP}

TAB

{TAB}

 

 

F1

{F1}

F2

{F2}

F3

{F3}

......

 

F11

{F11}

F12

{F12}

 

 

ENTER on NumPad

{{NumPadEnter}

/ on NumPad

{{NumPadSlash}

* on NumPad

{{NumPadAsterisk}

- on NumPad

{{NumPadMinus}

+ on NumPad

{{NumPadPlus}

.  on NumPad

{{NumPadDot}

0 on NumPad

{{NumPad0}

1 on NumPad

{{NumPad1}

2 on NumPad

{{NumPad2}

3 on NumPad

{{NumPad3}

4 on NumPad

{{NumPad4}

5 on NumPad

{{NumPad5}

6 on NumPad

{{NumPad6}

7 on NumPad

{{NumPad7}

8 on NumPad

{{NumPad8}

9 on NumPad

{{NumPad9}

 

 

Windows Key:

{{WindowsKey}

ContextMenu Key

{{WindowsDropDown}

 

Italic commands can not be recorded by the Recorder. Italic commands containing a *) can only be used in the Special-Text-Mode {{SendTextSpecial}.

 

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

%

 

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

+(EC) = Keep shift down and click E and C. ^%2 = @ (^% represents Alt Gr)

For more ways to enter CAPS LOCK, NUM LOCK, CTRL, Shift, Alt see the commands {{CapsLock, {{NumLock, {{CTRL, {{Alt and {{Shift in chapter "Adding Commands"

 

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 just the keystrokes it is possible to switch off the mouse recording in the Tools menu ('Tools' / 'Options' / 'Recording' / 'Record Mouse Events')

 

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 menu. ('Tools' / 'Options' / 'Edit / 'Use Hotkeys for insert…') 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.

 

 

1.9.2     Loading and Storing Macros

 

         

 

You can load existing macros by the menu 'Open…'. Already  loaded or saved macros can be found above the menu 'Exit'. The yellow-grey folder in the toolbar also allows you to open a macro. For fast prototyping a macro the two commands 'Load Temporary' and 'Save Temporary' are handy. These two command can also be found in the toolbar (grey arrows). Important: During 'Temporary Macros' - Open and Save no warnings are shown, even when changes are overwritten!

The commands 'Save' and 'Save as' let you save a macro. By using 'Save as' an existing macro can be saved with another name. In the toolbar the little disk serves as 'Save'.

 

 

1.9.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: 'Switch to Window'.

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 to line: 'Start Application'. Example: C:\PROGRAMS\MSOFFICE\WINWORD\WINWORD.EXE.

If the 'Start Application' and 'Switch to Window' are empty, no switch or start is carried out.

Commands {{Switch and {{Start

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.

 

 

1.9.4     Loops

 

 

Often an activity has to be repeated several times. Example: Copying content of 100 E-Mails to a WinWord document. The 'Loops' control lets you set how many times the macro is repeated. In this example the whole macro is run 3 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

{{2}I'm line two            Only during loop 2 the text is written.

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

 

Sometimes the loop number is needed. 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.

Disadvantage: If the total number of Loops is e.g. 150 the macro repeats 150 times despite of the {{Offset 100}. The command {{SetLoop 101 avoids this disadvantage.

 

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.

 

Loops can also be created by using command {{Goto.