No more performing the same task twice! Macro Recorder captures mouse events and keystrokes like a tape recorder, allowing you to automate tedious procedures on your computer. Download for Windows and Mac. Perform the actions. Macro Recorder records your mouse movements, mouse clicks and keyboard input. Clicks or holds down a mouse button, or turns the mouse wheel. NOTE: The Click function is generally more flexible and easier to use. MouseClick WhichButton, X, Y, ClickCount, Speed, DownOrUp, Relative. By the end of this tutorial you will have your own click recorder and know how to expand it out to do more then just click things. To follow along with this. Macronize, a macro builder, a mouse click and key press recorder with which you can automate your Windows programs and apps throught recording or adding precise steps (macro actions) and playing them back. A macro is a series of steps to automate your computer.
Clicks or holds down a mouse button, or turns the mouse wheel. NOTE: The Click function is generally more flexible and easier to use.
Parameters
Type: String
The button to click: Left (default), Right, Middle (or just the first letter of each of these); or the fourth or fifth mouse button (X1 or X2). For example:
MouseClick 'X1'
. This parameter may be omitted, in which case it defaults to Left.Left and Right correspond to the primary button and secondary button. If the user swaps the buttons via system settings, the physical positions of the buttons are swapped but the effect stays the same.
Rotate the mouse wheel: Specify WheelUp or WU to turn the wheel upward (away from you); specify WheelDown or WD to turn the wheel downward (toward you). Specify WheelLeft (or WL) or WheelRight (or WR) to push the wheel left or right, respectively. ClickCount is the number of notches to turn the wheel.
Type: Integer
The x/y coordinates to which the mouse cursor is moved prior to clicking. Coordinates are relative to the active window unless CoordMode was used to change that. If omitted, the cursor's current position is used.
Type: Integer
The number of times to click the mouse. If omitted, the button is clicked once.
Type: Integer
The speed to move the mouse in the range 0 (fastest) to 100 (slowest).
Note: A speed of 0 will move the mouse instantly.
If omitted, the default speed (as set by SetDefaultMouseSpeed or 2 otherwise) will be used.
Speed is ignored for SendInput/Play modes; they move the mouse instantaneously (though SetMouseDelay has a mode that applies to SendPlay). To visually move the mouse more slowly -- such as a script that performs a demonstration for an audience -- use
SendEvent '{Click 100, 200}'
or SendMode 'Event'
(optionally in conjuction with BlockInput).Type: String
If omitted, each click will consist of a 'down' event followed by an 'up' event. To change this behavior, specify one of the following letters:
D: Press the mouse button down but do not release it (i.e. generate a down-event).
U: Release the mouse button (i.e. generate an up-event).
Type: String
If omitted, the X and Y coordinates will be treated as absolute values. To change this behavior, specify the following letter:
R: The X and Y coordinates will be treated as offsets from the current mouse position. In other words, the cursor will be moved from its current position by X pixels to the right (left if negative) and Y pixels down (up if negative).
Remarks
This function uses the sending method set by SendMode.
The Click function is recommended over MouseClick because:
- It automatically compensates when the left and right mouse buttons are swapped via the control panel.
- It is generally easier to use.
To perform a shift-click or control-click, use the Send function before and after the operation as shown in these examples:
The SendPlay mode is able to successfully generate mouse events in a broader variety of games than the other modes. In addition, some applications and games may have trouble tracking the mouse if it moves too quickly. The speed parameter or SetDefaultMouseSpeed can be used to reduce the speed (in the default SendEvent mode only).
Some applications do not obey a ClickCount higher than 1 for the mouse wheel. For them, use a Loop such as the following:
The BlockInput function can be used to prevent any physical mouse activity by the user from disrupting the simulated mouse events produced by the mouse functions. However, this is generally not needed for the SendInput/Play modes because they automatically postpone the user's physical mouse activity until afterward.
There is an automatic delay after every click-down and click-up of the mouse (except for SendInput mode and for turning the mouse wheel). Use SetMouseDelay to change the length of the delay.
Related
CoordMode, SendMode, SetDefaultMouseSpeed, SetMouseDelay, Click, MouseClickDrag, MouseGetPos, MouseMove, ControlClick, BlockInput
Examples
#2: Move to specified coordinates then right-click once:
#3: Here are two hotkeys that simulate the turning of the mouse wheel:
}In the above, the loop is performed the specified number of times unless RunCount contains 0, in which case the loop is skipped entirely.
A loop may also terminate itself when one or more conditions change. The following example clicks the left mouse button repeatedly while the user is holding down the F1 key:
In the example above, when the user releases the F1 key, the loop detects this and stops itself via the break command. Break causes execution to jump to the line after the loop's closing brace.
An alternate way to achieve the same effect is with a 'while' loop:
Autohotkey Click Coordinates
The examples shown above are general-purpose loops. For more specialized needs, consider one of the following loops:
File-reading/writing loop: Retrieves the lines in a text file, one at a time. This can be used to transform a file into a different format on a line-by-line basis. It can also be used to search for lines matching your criteria.
Dynamicdotnettwain dll. Files and folders loop: Retrieves the specified files or folders, one at a time. This allows an operation to be performed upon each file or folder that meets your criteria.
Parsing loop: Retrieves substrings from a string, one at a time. This allows a string such as 'Red,Green,Blue' to be easily broken down into its three component fields.
Autohotkey Mouse Click Recorder Voice Recorder
Registry loop: Retrieves the contents of the specified registry subkey, one item at a time.