from what i understand i should be able to get the right window using ahk_exe and then send a spacebar input with ControlSend and repeat, and it should work even if the window is not active, but i dont really know how to go about this
could u provide any example code?
Thank!
EDIT:
i found this piece which i adapted to do what i'd like, and it works in other windows but not in the game window, any idea why?
Code: Select all
msgbox, Press ctrl+h in the monster hunter window to bind to it, and press f5 to start sending space. To pause inputs, press Pause, to close the script, press End
;Autoclicker is working in background
;All The Rest is not
;Coordmode, tooltip, screen
;coordmode, pixel, screen
;Coordmode, mouse, screen
#InstallKeybdHook
#SingleInstance, Force
DetectHiddenWindows, on
;SetControlDelay 1
SetBatchLines -1
Thread, Interrupt, 0
SetFormat, float, 0.0
^h::
WinGet, active_pid, PID, A
return
f5::
loop
{
sleep 300
controlSend,ahk_parent,{Space},ahk_pid %active_pid%,
}
Return
end::
exitapp
pause::
pause, toggle,
tooltip, Paused, 20, 20