ฟอรั่ม 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

    สอบถามวิธีทำ GUI ใน Autoit ครับ

    Pochi
    Pochi
    PSsix Member Class III
    PSsix Member Class III


    สอบถามวิธีทำ GUI ใน Autoit ครับ Empty
    จำนวนข้อความ : 66
    ความนิยม : 1
    เข้าร่วมเมื่อ : 22/10/2010

    สอบถามวิธีทำ GUI ใน Autoit ครับ Empty สอบถามวิธีทำ GUI ใน Autoit ครับ

    ตั้งหัวข้อ by Pochi 18/06/12, 08:28 pm

    ผมทำสคิปออกมาได้แล้วแบบเต็มจอครับ ถ้าสามารถใช้งานได้ทุกขนาดจอก็ดีครับ
    แล้วก็กดเมื่อ % เหลือตามที่กำหนด ผมอยากให้เลือกได้ 25% 50% 75%
    แต่ก็ติดที่เอาสคิปไปใส่ใน code GUI ไม่ถูกครับ
    รบกวนด้วยนะครับ

    สอบถามวิธีทำ GUI ใน Autoit ครับ LjB11s

    สคิปที่ใช้ครับ
    Code:
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Icon=C:\Documents and Settings\Administrator\My Documents\Downloads\monster-pink.ico
    #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    Global $GameHD
    MsgBox(4096, "โปรแกรมช่วยปั้ม Q,W,E [ปั้มเมื่อ 50% โหมดเต็มจอเท่านั้น]")
    MsgBox(4096, "แจกฟรี ห้ามซื้อ-ขาย")
    Func _PSsixLoadH($gtitle)
    $GameHD = WinGetHandle($gtitle)
    If @error Then
    MsgBox(4096, "Error", "กรุณาเปิดเกมก่อนใช้งานนะครับ !!!")
    Else
    Return 1
    EndIf
    EndFunc

    If _PSsixLoadH("Ran-Online") Then WinActivate($GameHD)

    While 1
    $coord = PixelSearch(0, 0, 140,15,0x262626 )
    if not @error then
    Sleep(500)
    Send ("q")
    EndIf
    $coord = PixelSearch(140, 15, 140,29,0x262626 )
    if not @error then
    Sleep(500)
    Send ("w")
    EndIf
    $coord = PixelSearch(140, 29, 140,43,0x262626 )
    if not @error then
    Sleep(500)
    Send ("e")
    EndIf
    WEnd

    code GUI
    Code:
    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=C:\Documents and Settings\My Computer\Desktop\Form1.kxf
    $Form1 = GUICreate("Form1", 228, 303, 192, 114)
    $Group1 = GUICtrlCreateGroup("Auto Key QWEASD", 8, 8, 209, 281)
    $Combo1 = GUICtrlCreateCombo("กดเมื่อเหลือ 50%", 104, 32, 105, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    $Checkbox2 = GUICtrlCreateCheckbox("Enable Q", 22, 33, 65, 17)
    $Checkbox3 = GUICtrlCreateCheckbox("Enable W", 22, 65, 65, 17)
    $Checkbox1 = GUICtrlCreateCheckbox("Enable E", 22, 97, 65, 17)
    $Checkbox4 = GUICtrlCreateCheckbox("Enable A", 22, 129, 65, 17)
    $Combo2 = GUICtrlCreateCombo("กดเมื่อเหลือ 50%", 102, 65, 105, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    $Combo3 = GUICtrlCreateCombo("กดเมื่อเหลือ 50%", 102, 97, 105, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    $Combo4 = GUICtrlCreateCombo("กดเมื่อเหลือ 50%", 102, 129, 105, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    $Combo5 = GUICtrlCreateCombo("กดเมื่อเหลือ 50%", 102, 161, 105, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    $Combo6 = GUICtrlCreateCombo("กดเมื่อเหลือ 50%", 102, 193, 105, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    $Checkbox5 = GUICtrlCreateCheckbox("Enable S", 22, 161, 65, 17)
    $Checkbox6 = GUICtrlCreateCheckbox("Enable D", 22, 193, 65, 17)
    $Button1 = GUICtrlCreateButton("Start / F9", 24, 232, 81, 41)
    $Button2 = GUICtrlCreateButton("Stop / F10", 120, 232, 81, 41)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    While 1
       $nMsg = GUIGetMsg()
       Switch $nMsg
          Case $GUI_EVENT_CLOSE
             Exit

       EndSwitch
    WEnd


    แก้ไขล่าสุดโดย ionair เมื่อ 19/06/12, 01:53 am, ทั้งหมด 2 ครั้ง
    avatar
    Fast
    PSsix Member Super Class III
    PSsix Member Super Class III


    สอบถามวิธีทำ GUI ใน Autoit ครับ Empty PSsix Program Coder
    จำนวนข้อความ : 217
    ความนิยม : 54
    เข้าร่วมเมื่อ : 19/06/2011

    สอบถามวิธีทำ GUI ใน Autoit ครับ Empty Re: สอบถามวิธีทำ GUI ใน Autoit ครับ

    ตั้งหัวข้อ by Fast 18/06/12, 09:15 pm

    ตั้งสคิ๊ปอ่านพิกัดจากหน้าต่างเกมส์เลยครับ ย้ายไปเครื่องไหนได้เหมือนกันวิธีทำ [You must be registered and logged in to see this link.]
    Pochi
    Pochi
    PSsix Member Class III
    PSsix Member Class III


    สอบถามวิธีทำ GUI ใน Autoit ครับ Empty
    จำนวนข้อความ : 66
    ความนิยม : 1
    เข้าร่วมเมื่อ : 22/10/2010

    สอบถามวิธีทำ GUI ใน Autoit ครับ Empty Re: สอบถามวิธีทำ GUI ใน Autoit ครับ

    ตั้งหัวข้อ by Pochi 19/06/12, 01:44 am

    Fast พิมพ์ว่า:ตั้งสคิ๊ปอ่านพิกัดจากหน้าต่างเกมส์เลยครับ ย้ายไปเครื่องไหนได้เหมือนกันวิธีทำ [You must be registered and logged in to see this link.]
    ขอบคุณมากนะครับ แต่ผมก็ไ่ม่ค่อยเข้าใจเท่าไรครับ มีตัวอย่างอื่นๆ ไหมครับ
    รบกวนด้วยครับ

      เวลาขณะนี้ 26/04/24, 11:37 pm