AHK working in current builds?

I tried a bunch of methods from the docs and pulled from other forums but nothing works, or at least reliably/exclusively. One of the many iterations I tried did work but it also killed the keys I assigned when GD wasn’t focused. Given I wanted to reassign the t and g keys it meant I’d have to disable it when I cut out to use Item Assistant or Grim Tools etc. I went through that many attempts I lost track of the one that kind of worked.

The problem is that I have 8 summons (Hellhound, Briarthorn, Familiar, Primal Spirit, Revenant of Og’Napesh, Harbinger, Crab Spirit and Blighted Rift Scourge) and I need four of the 10 hotkeys for skills too. The second bar is almost full with buffs but I don’t want to have any active skills there as I find it too fiddly to switch from/to it in the heat of battle.

Something very basic like


#IfWinActive ahk_exe Grim Dawn.exe
t::Send y, 0, y

should suffice, and it does if I replace “Grim Dawn.exe” with any other, like chrome, kodi etc. The same with


t::
    WinGet, Active_ID, ID, A
    WinGet, Active_Process, ProcessName, ahk_id %Active_ID%
    if ( Active_Process ="Grim Dawn.exe" ) {
        MsgBox, Grim Dawn is focused
    } else {
        MsgBox, %Active_Process% is focused
    }

Clicking on any window and then t shows the process name of the focused program, all except for GD, which shows nothing.

I have tried running AHK as admin, and GD isn’t running elevated either (checking in task manager to be sure). Pretty much out of ideas and I’ve spent hours on this and trying to smooth out the intermittent frame judder, although that is pretty much smoothed out now.

Does anyone have AHK working on latest builds, or even a working alternative like AutoIt? Cheers.

I’d recommend using AutoIt instead. It’s easy to use and you can find information about at least 99% of what you want to do in the internet. Moreover, you don’t have to update your program at all, you make it once, it works all the time (or until you break it :stuck_out_tongue: ).

AHK looks complicated, at least to me, AutoIt did look complicated at first, but I made my first program after just 15 minutes (5 mins of learning how it works, or rather just checking which functions I need to use to do what I want to do).

Sorted. For reference


HotKeySet("+{ESC}", "_Kill_It")

While 1
    If WinActive("Grim Dawn") Then
        HotKeySet("t", "set_t")
    Else
        HotKeySet("t")
    EndIf
    sleep(1000)
WEnd

Func _Kill_It()
    Exit
EndFunc

Func set_t()
    Send("y, 0, y")
EndFunc

A bit more complex than a two-liner in AHK, but it works, and it took about as long as you suggested. The zoo is back on the road. Cheers.