AutoHotkey - an exercise in futility?

After oh-so-many thousands of landings I attempted to make a 'docking request' macro with AutoHotkey. To my dismay - it's not working as expected. Anyone in know about how to make it work? The macro is sort of working; as when chat window is active and I poke the 'docking key', all the correct keys are sent into the chat window - but when chat is not active the macro does zip nada at all.

Piece of code...

Code:
#ifWinActive ahk_class FrontierDevelopmentsAppWinClass
#NoEnv
SetKeyDelay, 100,30
SendMode Input
Numpad0::
NumpadIns::
	Send 1
	Send e
	Send e
	Send {Space}
	Send s
	Send {Space}
	Send q
	Send q
	Send 1
return

AutoHotkey version I tried this with is 1.1.23.01
 
Last edited:
You might need to wait for the screen to open. The delay would depend on the speed of your graphics card and your internet connection. Perhaps a sleep command after the 1...

#ifWinActive ahk_class FrontierDevelopmentsAppWinClass
#NoEnv
SetKeyDelay, 100,30
SendMode Input
Numpad0::
NumpadIns::
Send 1
Sleep, 350
Send e
Send e
Send {Space}
Send s
Send {Space}
Send q
Send q
Send 1
return
 
You might need to wait for the screen to open. The delay would depend on the speed of your graphics card and your internet connection. Perhaps a sleep command after the 1...

Well, that's not the problem... Even if I reduce the Send section to:

Code:
#ifWinActive ahk_class FrontierDevelopmentsAppWinClass
#NoEnv
SetKeyDelay, 100,30
SendMode Input
Numpad0::
NumpadIns::
    Send 1
    return

... nothing happens - except when chat window is active (chat window receives the '1' just fine).

This also made an idea of having pre-fab message like...

Code:
Numpad9::
NumpadPgUp::
    Send 2
    Sleep, 200
    Send WATCH OUT PEOPLE! Incoming hot - canopy broken!{Enter}
    return

... impossible, at the moment :(
 
Last edited:
I use Voice Attack rather than Autohotkey, but the macros are similar. I had a problem with mouse clicks not registering and had to separate the click commands to press left mouse, pause, release left mouse. If Autohotkey has the same command, let's say press 1, sleep, release 1, it might work better.

Also, make sure you disable GUI effects in your graphics options. It can mess with macro timing.

Beyond that, I don't know.
 
Last edited:
After oh-so-many thousands of landings I attempted to make a 'docking request' macro with AutoHotkey. To my dismay - it's not working as expected. Anyone in know about how to make it work? The macro is sort of working; as when chat window is active and I poke the 'docking key', all the correct keys are sent into the chat window - but when chat is not active the macro does zip nada at all.

Piece of code...

Code:
#ifWinActive ahk_class FrontierDevelopmentsAppWinClass
#NoEnv
SetKeyDelay, 100,30
SendMode Input
Numpad0::
NumpadIns::
    Send 1
    Send e
    Send e
    Send {Space}
    Send s
    Send {Space}
    Send q
    Send q
    Send 1
return

AutoHotkey version I tried this with is 1.1.23.01

My only suggestion would be to try SendRaw everywhere that you aren't using either a Space or an Enter key.
 
I use Voice Attack rather than Autohotkey, but the macros are similar. I had a problem with mouse clicks not registering and had to separate the click commands to press left mouse, pause, release left mouse. If Autohotkey has the same command, let's say press 1, sleep, release 1, it might work better.

Also, make sure you disable GUI effects in your graphics options. It can mess with macro timing.

Beyond that, I don't know.

Now with that idea, and a bit of headbanging:

Code:
...
   Send {Blind}{1 DownTemp}
   Sleep, 50
   Send {Blind}{1 Up}
   Sleep, 50
   ' and so and so forth
...
... did the trick. Now the macro works - thanks for reminding about separate press/release :D ...oh boy it's one messy piece of work, but does what I wanted it to do. Probably could do with much smaller delay than 50ms, but - fine for now.
 
Last edited:
Now with that idea, and a bit of headbanging:

Code:
...
   Send {Blind}{1 DownTemp}
   Sleep, 50
   Send {Blind}{1 Up}
   Sleep, 50
   ' and so and so forth
...
... did the trick. Now the macro works - thanks for reminding about separate press/release :D ...oh boy it's one messy piece of work, but does what I wanted it to do. Probably could do with much smaller delay than 50ms, but - fine for now.


I have macros set up with my Corsair keyboard, you can drop to 40ms delay, but in my experience it became a bit hit and miss, so if 50 ms works for you, I'd stick with that.
 
Anika, Autohotkey is a minefield, been there, done that, got the Tee shirt.....Just get VA, Soooooooooooooooooooooooooooooooooooo Much easier. If you already have it or a derivative of VA, then give your self a break from AHK and just use it!

My, 2p's worth, for what it is worth :)
 
Anika, Autohotkey is a minefield, been there, done that, got the Tee shirt.....Just get VA, Soooooooooooooooooooooooooooooooooooo Much easier. If you already have it or a derivative of VA, then give your self a break from AHK and just use it!

My, 2p's worth, for what it is worth :)

I have VA and multiple voice packs for it, but if/when I'm not talking with other people with voicechat (of one or other type) while playing ED then I'm not using headset (and thus no mic to bark stuff into).
 
Last edited:
Anika, Autohotkey is a minefield, been there, done that, got the Tee shirt.....Just get VA, Soooooooooooooooooooooooooooooooooooo Much easier. If you already have it or a derivative of VA, then give your self a break from AHK and just use it!

My, 2p's worth, for what it is worth :)

I prefer VA as well. I used to use AHK back when it had the mouse recorder. It beat everything in the wild, but now, not so much.

Still, it's free. VA is $5.00 for each machine. I'm running 3. I could probably use the same registration on all 3, but I prefer to do these things above board. That, and VA deserves the cash.

- - - - - Additional Content Posted / Auto Merge - - - - -

I have VA and multiple voice packs for it, but if/when I'm not talking with other people with voicechat (of one or other type) while playing ED then I'm not using headset (and thus no mic to bark stuff into).

You can turn off the voice command for individual commands and use KB/Mouse macros in VA. More than half of my VA macros are KB only.
 
Last edited:
You can turn off the voice command for individual commands and use KB/Mouse macros in VA. More than half of my VA macros are KB only.

Hmm, good to know. However, using AHK for other stuff too (one main thing being wholesale disabling/changing alt-tab behavior - and caps-lock, etc. I hate caps-lock... it should be removed from keyboards).
 
Last edited:
AutohotKey stopped working after one of the recent updates.
I resolved this by setting the exe to be "run as administrator" (properties -> compatibility).

Now it works fine.
I use it for text communication. Regarding the request to land, I have this on my HOTAS (Thrustmaster Warthog).
 
Last edited:
I use this macro 20-30 times a day and it always works for me except when I go into the menus manually first which of course screws it up because the menus remember where you are:

; Request docking
^d::
setkeydelay, 50, 50
send, 1ee s qq1
exit

EDIT: I wonder if it's the class you're specifying? Those classes can relate to specific windows and not just the whole application which may be your issue. I just do:

#IfWinActive, Elite - Dangerous
 
Last edited:
Just wanted to chime in that VoiceAttack is much more simpler, and you get a voice response from your ships AI which is greatly satisfying. Sorry didn't really add to the thread.
 
I setup the same thing in VA, as a KB macro or a voice command. Def much more user friendly to program and test the macro with VA.
 
I setup the same thing in VA, as a KB macro or a voice command. Def much more user friendly to program and test the macro with VA.

I've no doubt this is true. I like autohotkey because it's way more powerful than all the alternatives, in that you can do a huge number of things with it and you can write some very sophisticated macros (if you're of a technical mind set). On the other hand if you're not technically minded that's probably not a key selling feature.
 
VoiceMacro works pretty well also - it's a free version of VoiceAttack, but I just use it for macros. Much easier to set up one than AHK in my opinion.

http://www.voicemacro.net/

Thanks! I keep on meaning to try VA but I have no idea how well the voice recognition will work, so I don't want to potentially throw away cash. I do know that VA has a "try before you buy" mode, but in my experience all trialware leaves a bunch of crud on your registry (they have to, else people would just keep on "trying out" the apps and never pay for them). All of these tools use the MS speech recognition engine, so if this one works for me VA will probably work as well.
 
Back
Top Bottom