Somehow while having the game paused, ControlSend can input any key into SA:MP, just very very very slowly.
As such, I decided to get SAMP Addon installed so that the game never pauses.
The problem that arose was that while I could ControlSend any normal keys into SA:MP with the game unfocused/minimized, special characters such as {ENTER} or {F6} didn't work. Thus, I could have the command entered into the chat by using "t" instead of {F6}, but I could never actually send it. My aim is to send commands with the game minimized so that I can do something else in the meantime.
Right now, I have to use ControlFocus or ControlClick for {F6} and {ENTER} to work, but that makes my cursor get stuck in the middle of the screen until I maximize SA:MP again.
I've thought of using a CLEO script to input the command and having AHK activate it in the background, but the CLEO script doesn't recognize AHK's virtual inputs as genuine key presses.
How may I address this issue?
As such, I decided to get SAMP Addon installed so that the game never pauses.
The problem that arose was that while I could ControlSend any normal keys into SA:MP with the game unfocused/minimized, special characters such as {ENTER} or {F6} didn't work. Thus, I could have the command entered into the chat by using "t" instead of {F6}, but I could never actually send it. My aim is to send commands with the game minimized so that I can do something else in the meantime.
Right now, I have to use ControlFocus or ControlClick for {F6} and {ENTER} to work, but that makes my cursor get stuck in the middle of the screen until I maximize SA:MP again.
I've thought of using a CLEO script to input the command and having AHK activate it in the background, but the CLEO script doesn't recognize AHK's virtual inputs as genuine key presses.
How may I address this issue?
Code:
#MaxThreadsPerHotkey 2
#If WinExist("GTA:SA:MP")
SetTitleMatchMode, 2
SetControlDelay -1
SetKeyDelay, -1, 10
!4::
ControlFocus,, ahk_exe gta_sa.exe ;this is the only way I could get it to work
ControlSend,, {F6}/work{ENTER}, ahk_exe gta_sa.exe
Return