ผมมีปัญหาตรงที่ว่ากด ESC แล้วมันออกโปรแกรมให้เลย
ผมอยากให้มัน Pause เหมือนกด ESC ครั้งแรก กดครั้งที่ 2 ให้ Remember ไม่ทรายว่าต้องใส่โค๊ดลงไปยังไง
โค๊ดแบบนิ้
Global $GameHD
Func _PSsixLoadH($gtitle)
$GameHD = WinGetHandle($gtitle)
If @error Then
MsgBox(4096, "Error", "ไม่พบหน้าต่างเกมส์")
Else
Return 1
EndIf
EndFunc
If _PSsixLoadH("Glory Destiny Online") Then WinActivate($GameHD)
HotKeySet("{ESC}", "pause")
While 1
if WinActive ($GameHD) then Send ("1")
Sleep(10)
if WinActive ($GameHD) then Send ("2")
Sleep(10)
if WinActive ($GameHD) then Send ("1")
Sleep(10)
if WinActive ($GameHD) then Send ("2")
WEnd
Func pause()
MsgBox(0,"Pause ", "ออกโปรแกรม Bye Bye!!~")
Sleep(50)
Exit
EndFunc
ผมอยากให้มัน Pause เหมือนกด ESC ครั้งแรก กดครั้งที่ 2 ให้ Remember ไม่ทรายว่าต้องใส่โค๊ดลงไปยังไง
โค๊ดแบบนิ้
Global $GameHD
Func _PSsixLoadH($gtitle)
$GameHD = WinGetHandle($gtitle)
If @error Then
MsgBox(4096, "Error", "ไม่พบหน้าต่างเกมส์")
Else
Return 1
EndIf
EndFunc
If _PSsixLoadH("Glory Destiny Online") Then WinActivate($GameHD)
HotKeySet("{ESC}", "pause")
While 1
if WinActive ($GameHD) then Send ("1")
Sleep(10)
if WinActive ($GameHD) then Send ("2")
Sleep(10)
if WinActive ($GameHD) then Send ("1")
Sleep(10)
if WinActive ($GameHD) then Send ("2")
WEnd
Func pause()
MsgBox(0,"Pause ", "ออกโปรแกรม Bye Bye!!~")
Sleep(50)
Exit
EndFunc