FiveM Inactive Window ControlSend
Posted: 18 Mar 2024, 10:06
Hi, so I've been wondering if there's possibility to use the code when window is inactive.
The code is very simple, just every 500-900 ms click E.
But it's important for me to make it work for inactive window.
The problem here is that when window is active there's no problem with auto-pressing the keys.
But once it goes inactive scripts doesn't work in the window.
Also would want to mention, that whenever I alt+tab and start dragging around there's a small lag-spike (?).
I've tested it on notepad it works perfectly.
Probably the GTA5 or FiveM processes are somewhat blocking the inputs to inactive windows, is there a way to bypass it?
[Mod action: Since this is v1 code, this topic was moved from AHK v2 help. ]
Code: Select all
SendOption1:
#IfWinActive ahk_class grcWindow
WinActivate, ahk_exe FiveM_b2802_GTAProcess.exe
Bursztyniarz = 1
ZbierajBursztyn:
If Bursztyniarz = 1
{
; Random , timerval2 , 80 , 120
; Send, {e down}
ControlSend, , {e down}, ahk_exe FiveM_b2802_GTAProcess.exe
; ControlSend, , {e down}, ahk_class grcWindow
; Sleep, %timerval2
; Send, {e up}
ControlSend, , {e up}, ahk_exe FiveM_b2802_GTAProcess.exe
; ControlSend, , {e up}, ahk_class grcWindow
Random, rand, 500, 900
SetTimer, ZbierajBursztyn, -%rand%
}
else
{
SetTimer, ZbierajBursztyn, Off
}
Return
Return
But it's important for me to make it work for inactive window.
The problem here is that when window is active there's no problem with auto-pressing the keys.
But once it goes inactive scripts doesn't work in the window.
Also would want to mention, that whenever I alt+tab and start dragging around there's a small lag-spike (?).
I've tested it on notepad it works perfectly.
Probably the GTA5 or FiveM processes are somewhat blocking the inputs to inactive windows, is there a way to bypass it?
[Mod action: Since this is v1 code, this topic was moved from AHK v2 help. ]