ขาดตรงไหนครับรบกวนท่านผู้รู้
#include
#include
Global $GameHD, $GameHD2
Func _PSsixLoadH($gtitle)
$GameHD = WinGetHandle($gtitle)
$GameHD2 = _WinAPI_GetWindow($GameHD, $GW_OWNER )
If @error Then
MsgBox(4096, "Error", "ไม่พบหน้าต่างเกม")
Else
Return 1
EndIf
EndFunc
If _PSsixLoadH("Nox App Player") Then WinActivate($GameHD)
Hotkeyset("{END}","stop")
Hotkeyset("{F1}","Pause")
Global $Paused
while 1
Sleep(1)
ControlSend($GameHD, "1", $GameHD2, "1")
Sleep(1)
WEnd
Func Pause()
$Paused = NOT $Paused
While $Paused
WEnd
EndFunc
Func stop()
Exit
EndFunc