Code: Select all
SetTitleMatchMode, 2
global ArrayPid
ArrayPid := []
WinGet, pokeId, List, DeSmuME
Loop, %pokeId%
{
WinGet, pid%A_Index%, PID, % "ahk_id " pokeId%A_Index%
ArrayPid.push(pid%A_Index%)
}
GiveInput(keyStroke)
{
ArraySize := % ArrayPid.MaxIndex()
Loop, %ArraySize%
{
pid := % ArrayPid[A_Index]
WinActivate, ahk_pid %pid%
Send, {%keyStroke% down}
Sleep 50
Send, {%keyStroke% up}
Sleep 75
}
}
Numpad1::
GiveInput("x")
return
Esc::ExitApp
even trying to use ControlGetFocus to use in the ControlSend command doesnt work:
Code: Select all
SetTitleMatchMode, 2
h::
ControlGet, WinControl3, HWND,,, DeSmuME
ControlGetFocus, WinControl4, DeSmuME
MsgBox % WinControl4 ;finds no control
MsgBox % WinControl3 ;finds a control, but neither works when in ControlSend
ControlSend, WinControl4, x, ahk_id %WinControl3%
return
Esc::ExitApp
Code: Select all
SetTitleMatchMode, 2
WinGet list, List, DeSmuME
h::
ControlSend,, x, ahk_id %list1%
ControlSend,, x, ahk_id %list2%
return
Esc::ExitApp
or even maybe if theres another emulator that I could swap to that would allow me to use ControlSend?
I've also attached an image of me using WindowSpy on DeSmuME.
Thank you for any help,
Polimthehat