Script Background
Posted: 09 May 2024, 21:01
Hello everyone, I'm new and I'm learning AHK, I need help running my script in the background of a game.
The game in question is a private server, called "Grand Fantasia Violet".
The command is simple, you just need to press the number 1 on the keyboard.
This is the code that I managed to make work in the window with focus, it was necessary to open the script as administrator for it to work.
I tried using this code in the background and it didn't work, ControlSend didn't work.
Here is the window information in Window Spy.
The game in question is a private server, called "Grand Fantasia Violet".
The command is simple, you just need to press the number 1 on the keyboard.
Code: Select all
F1::
Loop {
Send {F6 Down}
Sleep 10
Send {F6 Up}
Sleep 300
}
F2::ExitApp
Code: Select all
F1::
Loop {
ControlSend,, {1 Down}, ahk_class DJO_CLASS
Sleep 10
ControlSend,, {1 Up}, ahk_class DJO_CLASS
Sleep 300
}
F2::ExitApp
Here is the window information in Window Spy.