**Click n' Replay** is a tool that enables developers to simulate mouse and keyboard events. For Windows only, requires the [[http://www.microsoft.com/en-us/download/details.aspx?id=17718|.NET 4 redistributable package]]. Overview of the features: * Write scripts using a [[#language_instructions|very simple human-readable language]] and replay them. * Play/pause a script, or loop. * Record events and generate a script automatically. * Supports various events (key up/down, text typing, mouse move, mouse button up/down events) and useful additional instructions (bring a process to foreground). The source code and the binaries are available on BitBucket under the licence [[http://creativecommons.org/licenses/by/4.0/|Creative Commons Attribution 4.0 International (CC BY 4.0)]] : https://bitbucket.org/bbillet/clicknreplay The code uses a modified version of the [[http://www.codeproject.com/Articles/7294/Processing-Global-Mouse-and-Keyboard-Hooks-in-C|UserActivityHook]], which is distributed under the [[http://www.codeproject.com/info/cpol10.aspx|Code Project Open License (CPOL) 1.02]]. ===== Screenshots ===== {{::clicknreplay_screen.png|}} ===== Shortcut key===== Note: Shortcut keys can be used anywhere at any time. * **Alt+S** stop the running script. * **Alt+P** pause the running script. * **Alt+R** resume the paused script. ===== Language instructions ===== **CLICKDOWN x y **\\ Simulate a "Mouse button pressed" event. Default: left button. **CLICKUP x y **\\ Simulate a "Mouse button released" event. Default: left button. **CLICK x y **\\ Simulate a "Click" event (mouse button pressed and then relased). Default: left button. **MOUSEMOVE x y **\\ Simulate a mouse move. If "absolute", the cursor is moved to the point x,y. If "relative", the cursor is moved of x and y pixels from its original position. Default: absolute. **PAUSE milliseconds**\\ Make a pause. **TYPE text**\\ Simulate text typing (equivalent to a sequence of KEY commands). In loop mode, the sequence [LOOP_COUNTER] is automatically replaced by the current number of loop. **KEYDOWN keyCode**\\ Simulate a "Key pressed" event. The keyCode can be decimal or hexadecimal (begin with 0x). See the [[http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731.aspx|Virtual-Key Code Table]]. **KEYUP keyCode**\\ Simulate a "Key released" event. The keyCode can be decimal or hexadecimal (begin with 0x). See the [[http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731.aspx|Virtual-Key Code Table]]. **KEY keyCode**\\ Simulate a "Keystroke" event (key pressed and then released). The keyCode can be decimal or hexadecimal (begin with 0x). See the [[http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731.aspx|Virtual-Key Code Table]]. **FOREGROUND processName**\\ Find a process by its name and bring it to foreground. ===== Remarks ===== The recording tool has some limitations and can only record typing events and clicks. Other instructions must be written manually into the script.\\ I plan to improve this part in the future. Event simulation does not work well inside desktop virtual machine with mouse sharing enabled (tested with VirtualBox).