Did you ever wish you could find a tool that would take some of the grunt work away from you, but was not hard to use or set up… well do I have the toy for you or what :-)
What if you wanted to automate the clicking of a mouse… I don’t know say to reproduce a bug which requires clicking very very fast and your fingers are getting sore along with your ego ‘cause you see others doing it – hypothetical of course.
So you want to do 2 things left click and right click the mouse and then do it over and over… hmm sounds easy, and it should be.
Now if you were to have a blank page such that you could write a script to do this, and someone would come after you and write the code to just make it work, what would be the simplest way you could think to do it ?
lest start with the obvious
Click ; left should be implied
Click right
Cool that would be nice… now loop it well how about nice C syntax
loop 100 {
Click
Click right
}
But that would be too easy… but what that is spot on the syntax you need for AutoHotKey… nice !
Check it out here : http://www.autohotkey.com/ or just grab it from my machine \\fpstebail2\Installs\AutoHotkey104706_Install.exe
Other pluses I have seen in the first few mins of looking at it…
* It is open source
* Well documented
* Has context highlighting for all your favourite editors
Perhaps it gets sucky for the more complex stuff but this is exactly what I was looking for for my simple behaviours I want to repeat.
If I were a testers, I would take this simple script, well maybe this one :
$F1:: ; Make the F1 key into a hotkey (the $ symbol facilitates the "P" mode of GetKeyState below).
Loop ; Since no number is specified with it, this is an infinite loop unless "break" or "return" is encountered inside.
{
if not GetKeyState("F1", "P") ; If this statement is true, the user has physically released the F1 key.
break ; Break out of the loop.
Click ; Click the left mouse button at the cursor's current position.
Click right
}
return
And when ever I test a game I would launch this and hold down the F1 key and wiggle it around the game to see what I can break ( good old legendary Buys testing )!