ตอนนี้ผมไม่สามารถส่ง Key ไปยังหน้าจอเกมส์ได้ครับ
โดยอยากให้ส่งแบบ inactive window
ให้มันผ่าน Cut scene โดยปกติสามารถใช้ปุ่ม esc กับ insert ครับ
ใครพอเข้าใจช่วยผมหน่อยครับ _/\_
HotKeySet("{F5}", "_startProg")
HotKeySet("{F12}","_stopProg")
HotKeySet("{F2}", "_pauseProg")
Global $Paused = False , $GameHD , $gtitle
While 1
Sleep(200)
WEnd
Func _startProg() ;
MsgBox(4096,"AutoESC","Start")
If _PSsixLoadH("FIFA") = 1 Then
playGame()
EndIf
EndFunc ; end function
Func _PSsixLoadH($gtitle)
$GameHD = WinGetHandle($gtitle)
If @error Then
MsgBox(4096, "Error", "Fifa not found")
Else
Return 1
EndIf
EndFunc ; end function
Func playGame()
While 1
ControlSend("FIFA", "", "", "{ESC}") ;
sleep(1000);
send ("{ESC}");
WEnd
EndFunc ; end function
Func _pauseProg()
$Paused = NOT $Paused
sleep(100)
MsgBox(4096,"AutoESC","Paused")
EndFunc ; end function
Func _stopProg()
Exit 0
EndFunc ; end function
โดยอยากให้ส่งแบบ inactive window
ให้มันผ่าน Cut scene โดยปกติสามารถใช้ปุ่ม esc กับ insert ครับ
ใครพอเข้าใจช่วยผมหน่อยครับ _/\_
HotKeySet("{F5}", "_startProg")
HotKeySet("{F12}","_stopProg")
HotKeySet("{F2}", "_pauseProg")
Global $Paused = False , $GameHD , $gtitle
While 1
Sleep(200)
WEnd
Func _startProg() ;
MsgBox(4096,"AutoESC","Start")
If _PSsixLoadH("FIFA") = 1 Then
playGame()
EndIf
EndFunc ; end function
Func _PSsixLoadH($gtitle)
$GameHD = WinGetHandle($gtitle)
If @error Then
MsgBox(4096, "Error", "Fifa not found")
Else
Return 1
EndIf
EndFunc ; end function
Func playGame()
While 1
ControlSend("FIFA", "", "", "{ESC}") ;
sleep(1000);
send ("{ESC}");
WEnd
EndFunc ; end function
Func _pauseProg()
$Paused = NOT $Paused
sleep(100)
MsgBox(4096,"AutoESC","Paused")
EndFunc ; end function
Func _stopProg()
Exit 0
EndFunc ; end function