So I found this post from
@Helgef here:
https://www.autohotkey.com/boards/viewtopic.php?t=28889
"I don't know if this is related, but if I recall correctly, there's a bug in windows causing high CPU usage from querying unplugged sticks. Are all sticks plugged in?"
Perhaps its a windows bug and not an ahk bug. Either way I'd love to know how I should proceed.
Here's my options
1) Remove all Joy1::, Joy2:: etc hotkeys from the script and use getkeystate instead. Problem was when hotkeys get initialized next time the script runs without a controller the line: hotkey, Joy1, SomeLabel, On gets ran and triggers the cpu issue. I could do a check if the hotkey name has "Joy" and make sure a joystick is connected but this is getting extreme.
2) I tried evilC's joystickwrapper but my wired PS4 controller couldn't get recognized. I followed all the instructions and got the "No sticks found"error. I thought maybe it was driver related so I grabbed DS4Windows and still no luck. I tried asking in the AHK Discord and I don't want to bump an old evilC thread so maybe someone can point me in the right direction on joystickwrapper usage for PS4 controllers here.
Thanks to anyone who can take a look
edit: I went out an bought an Xbox controller and followed the instructions on a separate PC and still received the "No Sticks found" message. Quite baffled now.