ฟอรั่ม PSsix

Would you like to react to this message? Create an account in a few clicks or log in to continue.

ฟอรั่มของบล็อก http://pssix.blogspot.com


2 posters

    ปัญหาเกี่ยวกับ Pause ของ Hotkey เข้ามาดูทีครับ

    scanditionx
    scanditionx
    PSsix Member Class III
    PSsix Member Class III


    PSsix Game Coder
    จำนวนข้อความ : 51
    ความนิยม : 0
    เข้าร่วมเมื่อ : 02/10/2010
    อายุ : 35
    ที่อยู่ : ดาวโลก

    ปัญหาเกี่ยวกับ Pause ของ Hotkey เข้ามาดูทีครับ Empty ปัญหาเกี่ยวกับ Pause ของ Hotkey เข้ามาดูทีครับ

    ตั้งหัวข้อ by scanditionx 25/12/10, 09:11 am

    ช่วยดูทีนะครับ
    1.เปิดโปรแกรม Paint ก่อนนะครับ โปรแกรมถึงจะทำงาน
    2.กด INSERT = RUN MODE
    3.กด PAUSE = PAUSE MODE ปัญหาก็คือมันต้องกดถึง 2 ครั้งอ่ะครับ มันถึงจะเป็น PAUSE MODE
    รบกวนช่วยเช็คให้ทีครับ พอดีผมพึ่งหัดทำอ่ะครับ สคริปด้านล่างเลยครับ

    ขอบคุณล่วงหน้าเลยครับ

    ;.............................Main................................

    Opt("TrayOnEventMode",1)
    Opt("TrayMenuMode",1)

    HotKeySet("{INSERT}","Auto") ; Run Mode
    Hotkeyset("{PAUSE}","Pause") ; Pause Mode
    Hotkeyset("{END}","_Out") ; ออกโปรแกรม

    $about = ''
    $about &= "โปรแกรม Help Play Game Battle of the Immortals" & @LF
    $about &= ''& @LF


    TrayCreateItem("โปรแกรม Help Play Game Battle of the Immortals")
    TrayCreateItem("")
    TrayCreateItem("RUN MODE = INSERT KEY")
    TrayCreateItem("PAUSE MODE = PAUSE KEY")
    TrayCreateItem("")
    TrayCreateItem("เกี่ยวกับโปรแกรม")
    TrayItemSetOnEvent(-1, "DoAbout")
    TrayCreateItem("")
    TrayCreateItem("ออกจากโปรแกรม (กดปุ่ม End)")

    TraySetIcon("shell32.dll",13)
    TrayItemSetOnEvent(-1, "DoExit")

    Global $Paused

    if Not WinExists ("untitled - Paint") then
    MsgBox(64, "โปรแกรม Auto Hp,Mp v1.0", "You must be running เกม")
    Exit
    EndIf

    MsgBox(64, "โปรแกรม Help Play Game Battle of the Immortals", "To Start Press the Insert Key, and to Stop Press the Pause key,and to Exit Program press the End Key ")
    pause()
    ;......................................Function Mode.............................................;
    Func Auto()
    ToolTip("Run Mode", 2, 0)
    Sleep (400)
    start()
    EndFunc

    Func _Run()
    WinActivate ('untitled - Paint')
    Return
    EndFunc

    Func Pause()
    $Paused = NOT $Paused
    While $Paused
    ToolTip("Pause Mode - Press Insert to Run Mode ", 2, 0)
    WEnd
    EndFunc

    ;...........................................................
    Func start()

    _Run() ; HP ตัวผู้เล่น
    $Pixel = PixelGetColor(147,29)
    if $Pixel =0x050C07Then
    Send ("{F8}")
    sleep(5000)
    EndIf
    start()
    EndFunc

    ;.............................................................

    Func DoExit()
    Exit
    EndFunc

    Func DoAbout()
    Msgbox(64,"เกี่ยวกับ:",$about & @lf & " Made by Keng")
    EndFunc

    Func _Out()
    ToolTip("Exit Program ", 2, 0)
    MsgBox(64, "โปรแกรม Help Play Game Battle of the Immortals", " Thanks for used, Made By เก่ง")
    Exit
    EndFunc
    aut
    aut
    PSsix Powerful Scripting Class
    PSsix Powerful Scripting Class


    PSsix Game Coder
    จำนวนข้อความ : 472
    ความนิยม : 126
    เข้าร่วมเมื่อ : 24/07/2010

    ปัญหาเกี่ยวกับ Pause ของ Hotkey เข้ามาดูทีครับ Empty Re: ปัญหาเกี่ยวกับ Pause ของ Hotkey เข้ามาดูทีครับ

    ตั้งหัวข้อ by aut 25/12/10, 04:21 pm

    ลองดูก็ได้นิ แก้ตรงปุ่ม Hotkeyset("{PAUSE}","Pause") ; Pause Mode เป็นปุ่มตัวอื่นดูนะ


    กับตัวนี้ใส่ sleep เข้าไปด้วยม่ายงั้นมานจะโหลดซีพียูไปหมด

    Func Pause()
    $Paused = NOT $Paused
    While $Paused
    ToolTip("Pause Mode - Press Insert to Run Mode ", 2, 0)
    Sleep(100) ;<<<< ใส่เพิ่ม
    WEnd
    EndFunc
    scanditionx
    scanditionx
    PSsix Member Class III
    PSsix Member Class III


    PSsix Game Coder
    จำนวนข้อความ : 51
    ความนิยม : 0
    เข้าร่วมเมื่อ : 02/10/2010
    อายุ : 35
    ที่อยู่ : ดาวโลก

    ปัญหาเกี่ยวกับ Pause ของ Hotkey เข้ามาดูทีครับ Empty Re: ปัญหาเกี่ยวกับ Pause ของ Hotkey เข้ามาดูทีครับ

    ตั้งหัวข้อ by scanditionx 25/12/10, 07:45 pm

    ขอบคุณสำหรับคำแนะนำครับ

      เวลาขณะนี้ 27/04/24, 02:06 am