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


4 posters

    เกี่ยวกับการทำ auto mouse click

    avatar
    the2009
    สมาชิกทั่วไป
    สมาชิกทั่วไป


    เกี่ยวกับการทำ auto mouse click Empty
    จำนวนข้อความ : 11
    ความนิยม : 0
    เข้าร่วมเมื่อ : 13/09/2010

    เกี่ยวกับการทำ auto mouse click Empty เกี่ยวกับการทำ auto mouse click

    ตั้งหัวข้อ by the2009 07/10/10, 12:08 pm

    เกี่ยวกับการทำ auto mouse click

    ถ้าติ้กที่ check box ให้ตัวนั้นทำงานอะคับ

    แบบ PSautoPathClick ขอคำแนะนำหน่อย
    aut
    aut
    PSsix Powerful Scripting Class
    PSsix Powerful Scripting Class


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

    เกี่ยวกับการทำ auto mouse click Empty Re: เกี่ยวกับการทำ auto mouse click

    ตั้งหัวข้อ by aut 07/10/10, 05:23 pm

    ก็ใช้คำสั่ง MouseClick แล้วก็เอา while 1 กับ wend ครอบเอา มันก็จาคลิกไปเรื่อย
    avatar
    the2009
    สมาชิกทั่วไป
    สมาชิกทั่วไป


    เกี่ยวกับการทำ auto mouse click Empty
    จำนวนข้อความ : 11
    ความนิยม : 0
    เข้าร่วมเมื่อ : 13/09/2010

    เกี่ยวกับการทำ auto mouse click Empty Re: เกี่ยวกับการทำ auto mouse click

    ตั้งหัวข้อ by the2009 08/10/10, 12:21 pm

    ตรงนั้นงมจนได้แล้วคับ

    อีก1คำถาม ทำยังไงให้มัน วนซ้ำ หลายๆ รอบคับ
    aut
    aut
    PSsix Powerful Scripting Class
    PSsix Powerful Scripting Class


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

    เกี่ยวกับการทำ auto mouse click Empty Re: เกี่ยวกับการทำ auto mouse click

    ตั้งหัวข้อ by aut 08/10/10, 06:22 pm

    ก็ใช้คำสั่ง MouseClick แล้วก็เอา while 1 กับ wend ครอบเอา มันก็จาคลิกไปเรื่อย
    scanditionx
    scanditionx
    PSsix Member Class III
    PSsix Member Class III


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

    เกี่ยวกับการทำ auto mouse click Empty Re: เกี่ยวกับการทำ auto mouse click

    ตั้งหัวข้อ by scanditionx 08/10/10, 07:36 pm

    While 1
    MouseClick("Left")
    WEnd

    แค่นี้ก็ Click รัวแล้วครับ ถ้าไม่อยากให้รัวก็ใส่ Sleep(1000)

    While 1
    MouseClick("Left")
    Sleep(1000) ;1000 = 1 วิ
    WEnd

    POS
    POS
    PSsix
    PSsix


    เกี่ยวกับการทำ auto mouse click Empty เกี่ยวกับการทำ auto mouse click Empty เกี่ยวกับการทำ auto mouse click Empty
    จำนวนข้อความ : 1152
    ความนิยม : 326
    เข้าร่วมเมื่อ : 19/07/2010

    เกี่ยวกับการทำ auto mouse click Empty Re: เกี่ยวกับการทำ auto mouse click

    ตั้งหัวข้อ by POS 09/10/10, 05:59 am

    ตัวอย่างโค้ดโปรแกรมแบบย่อๆ ลองเอาไปศึกษาดู ยังไงไม่ลำบากเกินไป ก็ไปดูตรงหนังสือ Hack Windows [You must be registered and logged in to see this link.] บทที่ 10 มีคำอธิบายการสร้างหน้าต่าง การกำหนดเช็คบ็อกซ์ และสร้างโปรแกรม Tweak จาก AutoIt อยู่แล้ว

    Code:
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

    HotKeySet("{ESC}", "stop")

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 244, 95, 192, 124)
    $Button1 = GUICtrlCreateButton("เริ่มคลิก", 144, 16, 75, 25, $WS_GROUP)
    $Radio1 = GUICtrlCreateRadio("คลิกช้า", 16, 16, 113, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Radio2 = GUICtrlCreateRadio("คลิกเร็ว", 16, 56, 113, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

          Case $Form1
          Case $Button1
             While 1
                
             $r = GUICtrlRead($Radio1)
                if $r = $GUI_CHECKED Then
                   MouseClick("")
                   Sleep(1000) ;หยุด 1 วิ ก่อนคลิก
                Else
                   MouseClick("")
                   Sleep(100) ; หยุด  0.1 วิ ก่อนคลิก

                EndIf
             WEnd

          Case $Radio1
          Case $Radio2
       EndSwitch
    WEnd

    Func stop()
       Exit
       EndFunc
    avatar
    the2009
    สมาชิกทั่วไป
    สมาชิกทั่วไป


    เกี่ยวกับการทำ auto mouse click Empty
    จำนวนข้อความ : 11
    ความนิยม : 0
    เข้าร่วมเมื่อ : 13/09/2010

    เกี่ยวกับการทำ auto mouse click Empty Re: เกี่ยวกับการทำ auto mouse click

    ตั้งหัวข้อ by the2009 09/10/10, 05:49 pm

    แล้วจะทำยังไงให้มันทำซ้ำแบบ 1>2>3>4>5>6>7>8 เริ่ม 1>2>3>4>5>6>7>8 ใหม่ตามจำนวนที่ต้องการคับ

    Code:
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1_1 = GUICreate("Form1", 537, 369, 190, 119)
    $MouseStep1 = GUICtrlCreateGroup("MouseStep1", 8, 8, 201, 65)
    $Input1_1 = GUICtrlCreateInput("535", 88, 32, 33, 21)
    $Input2_1 = GUICtrlCreateInput("415", 128, 32, 33, 21)
    $Input3_1 = GUICtrlCreateInput("3000", 168, 32, 33, 21)
    $start1 = GUICtrlCreateCheckbox("start1", 16, 32, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MouseStep2 = GUICtrlCreateGroup("MouseStep2", 8, 80, 201, 65)
    $Input1_2 = GUICtrlCreateInput("420", 88, 104, 33, 21)
    $Input2_2 = GUICtrlCreateInput("390", 128, 104, 33, 21)
    $Input3_2 = GUICtrlCreateInput("3000", 168, 104, 33, 21)
    $start2 = GUICtrlCreateCheckbox("start2", 16, 104, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MouseStep3 = GUICtrlCreateGroup("MouseStep3", 8, 152, 201, 65)
    $Input1_3 = GUICtrlCreateInput("535", 88, 176, 33, 21)
    $Input2_3 = GUICtrlCreateInput("415", 128, 176, 33, 21)
    $Input3_3 = GUICtrlCreateInput("3000", 168, 176, 33, 21)
    $start3 = GUICtrlCreateCheckbox("start3", 16, 176, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MouseStep4 = GUICtrlCreateGroup("MouseStep4", 8, 224, 201, 65)
    $Input1_4 = GUICtrlCreateInput("535", 88, 248, 33, 21)
    $Input2_4 = GUICtrlCreateInput("415", 128, 248, 33, 21)
    $Input3_4 = GUICtrlCreateInput("3000", 168, 248, 33, 21)
    $start4 = GUICtrlCreateCheckbox("start4", 16, 248, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MouseStep5 = GUICtrlCreateGroup("MouseStep5", 8, 296, 201, 65)
    $Input1_5 = GUICtrlCreateInput("535", 88, 320, 33, 21)
    $Input2_5 = GUICtrlCreateInput("415", 128, 320, 33, 21)
    $Input3_5 = GUICtrlCreateInput("3000", 168, 320, 33, 21)
    $start5 = GUICtrlCreateCheckbox("start5", 16, 320, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MouseStep6 = GUICtrlCreateGroup("MouseStep6", 216, 8, 201, 65)
    $Input1_6 = GUICtrlCreateInput("535", 296, 32, 33, 21)
    $Input2_6 = GUICtrlCreateInput("415", 336, 32, 33, 21)
    $Input3_6 = GUICtrlCreateInput("3000", 376, 32, 33, 21)
    $start6 = GUICtrlCreateCheckbox("start6", 224, 32, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MouseStep7 = GUICtrlCreateGroup("MouseStep7", 216, 80, 201, 65)
    $Input1_7 = GUICtrlCreateInput("530", 296, 104, 33, 21)
    $Input2_7 = GUICtrlCreateInput("535", 336, 104, 33, 21)
    $Input3_7 = GUICtrlCreateInput("3000", 376, 104, 33, 21)
    $start7 = GUICtrlCreateCheckbox("start7", 224, 104, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MouseStep8 = GUICtrlCreateGroup("MouseStep8", 216, 152, 201, 65)
    $Input1_8 = GUICtrlCreateInput("535", 296, 176, 33, 21)
    $Input2_8 = GUICtrlCreateInput("415", 336, 176, 33, 21)
    $Input3_8 = GUICtrlCreateInput("3000", 376, 176, 33, 21)
    $start8 = GUICtrlCreateCheckbox("start8", 224, 176, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MouseStep9 = GUICtrlCreateGroup("MouseStep9", 216, 224, 201, 65)
    $Input1_9 = GUICtrlCreateInput("530", 296, 248, 33, 21)
    $Input2_9 = GUICtrlCreateInput("535", 336, 248, 33, 21)
    $Input3_9 = GUICtrlCreateInput("3000", 376, 248, 33, 21)
    $start9 = GUICtrlCreateCheckbox("start9", 224, 248, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MouseStep10 = GUICtrlCreateGroup("MouseStep10", 216, 296, 201, 65)
    $Input1_10 = GUICtrlCreateInput("535", 296, 320, 33, 21)
    $Input2_10 = GUICtrlCreateInput("415", 336, 320, 33, 21)
    $Input3_10 = GUICtrlCreateInput("3000", 376, 320, 33, 21)
    $start10 = GUICtrlCreateCheckbox("start10", 224, 320, 57, 25)

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Setting = GUICtrlCreateGroup("Setting", 424, 16, 105, 345)
    $Button1 = GUICtrlCreateButton("Button1", 432, 80, 89, 89, $WS_GROUP)
    $loop = GUICtrlCreateLabel("loop", 432, 46, 24, 17)
    $Input1 = GUICtrlCreateInput("1", 480, 40, 41, 21)
    $Edit1 = GUICtrlCreateEdit("", 432, 176, 89, 177, $ES_WANTRETURN)
    GUICtrlSetData(-1, "Auto Mouse Click 0.1 เวอร์ชั่นทดสอบ      By`nOrThzEn")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    HotKeySet("{ESC}", "_Exit")

    While 1

       $nMsg = GUIGetMsg()

       $avMouse = MouseGetPos()
       $iPixel = PixelGetColor($avMouse[0], $avMouse[1])
       ToolTip(" X=" & $avMouse[0] & "  Y=" & $avMouse[1] & "  Color=0x" & Hex($iPixel, 6))

       Switch $nMsg
          Case $GUI_EVENT_CLOSE

             Exit

          Case $Button1
             addfrauto()

          Case $start1
          Case $start2
          Case $start3
          Case $start4
          Case $start5
          Case $start6
          Case $start7
          Case $start8
          Case $start9
          Case $start10

          Case $Input1_1
          Case $Input2_1
          Case $Input3_1

          Case $Input1_2
          Case $Input2_2
          Case $Input3_2

          Case $Input1_3
          Case $Input2_3
          Case $Input3_3

          Case $Input1_4
          Case $Input2_4
          Case $Input3_4

          Case $Input1_5
          Case $Input2_5
          Case $Input3_5

          Case $Input1_6
          Case $Input2_6
          Case $Input3_6

          Case $Input1_7
          Case $Input2_7
          Case $Input3_7

          Case $Input1_8
          Case $Input2_8
          Case $Input3_8

          Case $Input1_9
          Case $Input2_9
          Case $Input3_9

          Case $Input1_10
          Case $Input2_10
          Case $Input3_10

       EndSwitch
    WEnd


    Func addfrauto()
    if(GuiCtrlRead($start1)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_1), GUICtrlRead($Input2_1), 1)
    sleep(GUICtrlRead($Input3_1))
    EndIf

    if(GuiCtrlRead($start2)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_2), GUICtrlRead($Input2_2), 1)
    sleep(GUICtrlRead($Input3_2))
    EndIf

    if(GuiCtrlRead($start3)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_3), GUICtrlRead($Input2_3), 1)
    sleep(GUICtrlRead($Input3_3))
    EndIf

    if(GuiCtrlRead($start4)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_4), GUICtrlRead($Input2_4), 1)
    sleep(GUICtrlRead($Input3_4))
    EndIf

    if(GuiCtrlRead($start5)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_5), GUICtrlRead($Input2_5), 1)
    sleep(GUICtrlRead($Input3_5))
    EndIf

    if(GuiCtrlRead($start6)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_6), GUICtrlRead($Input2_6), 1)
    sleep(GUICtrlRead($Input3_6))
    EndIf

    if(GuiCtrlRead($start7)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_7), GUICtrlRead($Input2_7), 1)
    sleep(GUICtrlRead($Input3_7))
    EndIf

    if(GuiCtrlRead($start8)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_8), GUICtrlRead($Input2_8), 1)
    sleep(GUICtrlRead($Input3_8))
    EndIf

    if(GuiCtrlRead($start9)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_9), GUICtrlRead($Input2_9), 1)
    sleep(GUICtrlRead($Input3_9))
    EndIf

    if(GuiCtrlRead($start10)  = 1) then
    MouseClick("left", GUICtrlRead($Input1_10), GUICtrlRead($Input2_10), 1)
    sleep(GUICtrlRead($Input3_10))
    EndIf

    EndFunc

     Func _Exit()
        Exit
    EndFunc
    aut
    aut
    PSsix Powerful Scripting Class
    PSsix Powerful Scripting Class


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

    เกี่ยวกับการทำ auto mouse click Empty Re: เกี่ยวกับการทำ auto mouse click

    ตั้งหัวข้อ by aut 09/10/10, 08:20 pm

    นายก็ใส่ for ครอบไปก่อนดิ หาอ่านเอาตามหนังสือ vb ก็ได้คำสั่งก็เหมือนกัน อันนี้ 5 รอบ

    For $i = 1 to 5
    MsgBox(0, "รอบ", $i)
    Next

      เวลาขณะนี้ 02/05/24, 07:27 pm