I see the controls in Window Spy but can't retrieve them in AHK Script

Ask gaming related questions
YummyPancakes
Posts: 2
Joined: 08 Jan 2024, 23:17

I see the controls in Window Spy but can't retrieve them in AHK Script

08 Jan 2024, 23:27

Using AHK's Window Spy I can see 4 different types of controls for the Planetside 2 game window. I'm trying to get these controls through AHK but the below script is just printing "0000". Why is it that I can see the controls in win spy but can't retrieve them in AHK? My script is running in administrator mode.

Code: Select all

5::
{
    SoundBeep 1500
    DetectHiddenWindows true
    DetectHiddenText true
    SetTitleMatchMode "Slow"

    a := WinGetControls('ahk_class Planetside2 PlayClient (Stage) x64')
    b := WinGetControls('ahk_exe PlanetSide2_x64.exe')
    c := WinGetControls('ahk_pid 10604')
    d := WinGetControls('ahk_id 918090')

    MsgBox(a.Length b.Length c.Length d.Length)
}
If I'm able to get the above done then I want to be able to use ControlSend. Below is a working example of how I use ControlSend in notepad.

Code: Select all

ControlSend "^a", WinGetControls(winTitle := 'ahk_exe notepad.exe')[1], winTitle
YummyPancakes
Posts: 2
Joined: 08 Jan 2024, 23:17

Re: I see the controls in Window Spy but can't retrieve them in AHK Script

08 Jan 2024, 23:40

I have also tried
- changing the game window to Fullscreen, Borderless Fullscreen and Windowed Mode
- changing the key delay with SetKeyDelay 0, 30
- using ControlSend with only specifying the game window title

Return to “Gaming Help (v2)”

Who is online

Users browsing this forum: No registered users and 14 guests