เกี่ยวกับการทำ auto mouse click
ถ้าติ้กที่ check box ให้ตัวนั้นทำงานอะคับ
แบบ PSautoPathClick ขอคำแนะนำหน่อย
ถ้าติ้กที่ check box ให้ตัวนั้นทำงานอะคับ
แบบ PSautoPathClick ขอคำแนะนำหน่อย
#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
#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
|
|