AutoHotKey has been around for ages now but I've always been so hesitant to get involved with it since it is so very well known for it's automation ability which is against Blizzard's ToS or EULA, but over the last year or two it has become extremely popular via the huge multi-boxing community.
I know the Wind Traders and some others have discussed the use of AutoHotKey several times now, some touching on the slightly more illegitimate uses, which has again caused me to shy away from it slightly. The other day a discussion popped up on the forums about using AHK legitimately for milling/prospecting and Jenzali posted a neat little simple script that can be used.
I gave it a try and it works wonderfully, so I'm writing a quick guide to help anyone else interested focus on the purely legitimate uses of AHK.
[Note:] @Pliaksi has written a very nice program called the Consortium Key Sender (CKS) which effectively is putting this script into a nice program and adding a bunch of handy features to it. If you find you are looking for something more after trying my version then be sure to check out his too! http://consortium.stormspire.net/con...ender-cks.html
This tutorial will help you setup AutoHotKey to send the keypress "=" into World of Warcraft every time there is movement on your mouse, even if you are busy browsing the internet with wow in the background.
Alright well head over to the AHK Download Page and download the appropriate version for you. You can choose between the .exe file or a zip file as well.
Start up the installation wizard, accept the ToS and select Main Program and Script Compiler as components to install. Continue through the basic installation and skip showing the help file unless you really want to.
When you start it up the first time it will give you a message saying "To help you get started, would you like to create a sample script in the My Documents folder?". Click Yes.
It will now open a notepad file which is the script, it has some basic instructions to help you understand it. Delete it all and replace it with this script:
Credits go to Jenzali for the script - I only added a pause script keybind and modified it to send the keypress every 4 seconds rather than 1 second since it takes about 2.5-3 seconds on average to prospect and loot. Added 1 extra second because I don't want to spam the command too quickly. You can change the line "settimer, check, 4000' down to 3000 if you want it quicker.Code:#persistent coordmode, mouse, screen mousegetpos, sx, sy settimer, check, 4000 return ;*** Pause Script *** ~=::Pause check: mousegetpos, cx, cy if (cx != sx or cy != sy) { ; mouse has moved, calculate by how much if (cx > (sx+2) or cx < (sx-2) or cy > (sy+2) or cy < (sy-2)) { ControlSend,,1,World of Warcraft mousegetpos, sx, sy ; get new mouse position } } return
The red = is what pauses and unpauses the script. Replace it with what ever you want.
The red 1 is the keypress it sends to wow. Replace it with what ever you want.
Once you have the script pasted in there save the file and close it. You will now need to start AHK again (the first time was it just set it all up etc). Every time you modify the script you need to restart AHK or select "reload this script" from it's menu that you will see in a second.
When you start it up again now, it should start automatically running and you will see a green and white "H" icon in the bottom left hand corner of your screen. Right click it and you will see the following options:
The only ones you need to know are:
- Reload This Script - reloads the script currently chosen, must use it if you make any edits while the script is loaded.
- Edit This Script - opens up that text file again allows you to make quick changes.
- Pause Script - pauses the script (will show a tick next to the option) and prevents it from running. I do this when I run out of ore/herbs and need to fetch more or have to clear bag spaces etc. It's pointless to have the script running when you have nothing to process. Click the option again to start it again.
- Exit - yeah use your imagination.
What we are doing here IS perfectly legitimate and allowed. It has been confirmed over and over again. HOWEVER Blizzard DOES use their own form of Automation (ironic isn't it?) in order to detect cheaters. As far as I can find there has been no case where a player has been banned/suspended for using AHK (because wow can't detect it and it's also legitemate).
But if you are seen sitting in the middle of SW for 10 hours only prospecting at exactly even times, then it's possible that someone might report you or Blizzard will pick up the precise prospect every 4 seconds for 10 hours EVERY TIME - which is impossible by human hands for that kind of precision. Hence they may think you are fully automating it and send you a temporary or permanent ban. A quick email explaining what you were doing will get you unbanned within no time.
In order to prevent something like this though, I would recommend opening up a ticket with something along the lines of:
So that you can get a personal GM response saved on your account chat logs. If you do get banned simply tell Blizzard that you DID check with GM staff and the conversation is in your chat logs with them. You could maybe record the day/time/gm name etc when the GM does contact you in a txt file somewhere on your computer so you can tell them to go look at the chat logs on the 9th of September at 22:35PM server time between you and GM Zaveloolipop.Hello there, I would like to use a macro that sends a keystroke to WoW whenever I move my mouse, but wish to check whether it is ok first.
It requires me to be at the computer, and each keystroke is the direct and immediate result of a human action, me moving my mouse (one-to-one). If I am not at the computer, nothing is sent.
I am wondering if this is legal or if it will get me banned?
Thanks for your time and for such a great game.
Funnily enough, my first thought to try and reduce the change of an accidental ban was to add some kind of "cooldown" or random timer between key presses. @Stede helped me with some of that code causing it to a slight random delay but have since taken it out because there is some rather cloudy information that adding automatic delays to this legitimate process can turn it into a bannable action. Stede and I both think that the example which refers to this delay being bannable is used a bit out of context and that it probably isn't so, but just to be safe rather don't add anything like that.
Another feature that I wish to add but haven't bothered to look into yet is getting AHK to send the keypress to only ONE of my multiple wow clients open. It is possible but I can't be bothered to figure out how to do it just yet.
Again thank you to:
@Jenzali for triggering the discussion and providing the script.
@Stede for his insight, expertise and patience in our discussion on IRC.
Parog from MMOwned for pointing me in the right direction for when I do eventually want to get AHK to only send to specific wow windows.



