4 ms·
I don't use xbindkeys so maybe my impression is wrong, but AHK is far more powerful. You can incorporate state into your scripts, or read things from the screen
by squeaky-clean 4y ago
I don't use xbindkeys so maybe my impression is wrong, but AHK is far more powerful. You can incorporate state into your scripts, or read things from the screen and act conditially on it (though the repo says WindowSpy is unsupported. I think that's what allowed screen-reading).
You can compile it into a binary with no dependencies, so you can easily bring your script to other computers or share it. You can create a GUI to run commands rather than binding them to key patterns.
I used to use it in World of Warcraft to do things like have my character's entire skill rotation on one key (e.g. just keep pressing "1" and AHK will handle pressing the next "real" key for the sequence. Hit another key and I can reset the sequence early). And to automatically tatget myself and cast a heal when my health goes below 50%, which was done by polling a certain pixel on the screen for a specific value of red.
- A4ET8a8uTh0 4y agoAbsolute level of awesome ( even though some companies do clamp down hard on features like these for a variety of reasons ). Have you tried offering those scripts to players? I am more than certain that most MMOs would have loved to use them.
- jabroni_salad 4y agoBlizzard does ban for autohotkey, and even stuff like gaming keyboard macros.
- squeaky-clean 4y agoSorry :p this was way-way back in vanilla days, before I took backing up my code seriously. I actually had a way more advanced, but very buggy script I used for "multi boxing", which is when you pay for multiple accounts and play them simultaneously. I used WASD, TFGH, IJKL, for moving 3 characters simultaneously, the numpad for targeting, and ctrl/shift/alt + number-row for casting spells on any of the windows. So ctrl+2 would cast the warrior 2nd ability, shift+alt+4 would cast the druid and mage 4th ability, ctrl+shift+alt+2 would cast all character's 2nd ability, etc. Blizzard used to be a lot more lax about macros[0], and they liked multiboxing because it was more money. I had a GM message me once to confirm I was playing all 3 and not afk botting. We chatted about AHK and how he wanted to learn to code. [0] also the tools to detect macros were way worse back then, it might have been that they just accepted it rather than actually embracing it.
- amelius 4y agoI'm wondering, why introduce a new scripting language; wouldn't it make more sense to release it as e.g. a Python library? Or something that you can script with Bash?
- squeaky-clean 4y agoWell this was back in the Python 2.4 days, I don't think I had even heard of it. And bash isn't easily available on Windows, at least interacting with running win32 programs. Back then it was even worse, I think I used mingw32 when I needed that? Blizzard did offer some sort of official macro system using Lua, but that was a bit advanced for me at the time. A dedicated language is nice because the syntax can be optimized for its purpose. As a teen with little coding experience, AHK was so easy to get simple ideas working. Often one easy line of code. Some of the bigger monstrosities I wrote would have definitely been more manageable in another language, but then I'd have to handle always-active input listening, window management, emulating the keyboard and cursor, reading screen pixels, my own state machine for key chording, and so on. Or cobble together libraries (and still learn those). Also probably the most important part, it was fun to work with and immediate. I wasn't a professional (or even good) programmer. But I had a goal in mind and AHK never made me want to quit.
- llllllllllll9 4y agowell done. don't be so hard on yourself. ahk is amazing stuff.
- selfhoster11 4y agoAHK is fairly well established in its niche, so not a new language by any stretch. That's even before you get to the complexity of Python or Bash vs a dedicated DSL.