[Asm] 纯文本查看 复制代码
#region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_Icon=favicon.ico
#PRE_Outfile=鼠标连点器4.0.exe
#PRE_UseX64=n
#PRE_Res_requestedExecutionLevel=None
#PRE_Add_Constants=y
#PRE_Run_Tidy=y
#endregion ;**** 参数创建于 ACNWrapper_GUI ****
$g_szVersion = "鼠标连点器4.0-ZPSoft-52pojie.cn"
If WinExists($g_szVersion) Then Exit ; 此脚本已经运行了
AutoItWinSetTitle($g_szVersion)
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("鼠标连点器4.0-ZPSoft-52pojie.cn", 437, 123, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Group1 = GUICtrlCreateGroup("频率", 20, 8, 120, 50)
$Input1 = GUICtrlCreateInput("10", 28, 28, 48, 21)
GUICtrlSetOnEvent(-1, "Input1Change")
$Label1 = GUICtrlCreateLabel("次/10秒", 80, 32, 48, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("热键", 160, 8, 120, 100)
$Label2 = GUICtrlCreateLabel("左键", 169, 32, 24, 18)
$Label3 = GUICtrlCreateLabel("右键", 169, 56, 24, 18)
$Label4 = GUICtrlCreateLabel("停止", 169, 80, 26, 18)
$Combo1 = GUICtrlCreateCombo("F1", 208, 28, 57, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|Esc", "F9")
GUICtrlSetOnEvent(-1, "Combo1Change")
$Combo2 = GUICtrlCreateCombo("F1", 208, 52, 57, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|Esc", "F10")
GUICtrlSetOnEvent(-1, "Combo2Change")
$Combo3 = GUICtrlCreateCombo("F1", 208, 76, 57, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|Esc", "F11")
GUICtrlSetOnEvent(-1, "Combo3Change")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Pic1 = GUICtrlCreatePic("D:\autoit3\au3\logo.jpg", 20, 64, 120, 40)
$Group3 = GUICtrlCreateGroup("停止条件", 300, 8, 120, 100)
$Label5 = GUICtrlCreateLabel("次数", 309, 32, 24, 18)
$Input2 = GUICtrlCreateInput("", 348, 28, 48, 21)
GUICtrlSetOnEvent(-1, "Input2Change")
$Label8 = GUICtrlCreateLabel("次", 402, 32, 12, 18)
;~ $Label6 = GUICtrlCreateLabel("时间", 309, 56, 24, 18)
;~ $Input3 = GUICtrlCreateInput("", 348, 56, 48, 21)
;~ $Label9 = GUICtrlCreateLabel("秒", 402, 56, 12, 18)
$Radio1 = GUICtrlCreateRadio("无(条件清零)", 309, 56, 108, 17)
GUICtrlSetState($Radio1, $GUI_CHECKED)
GUICtrlSetOnEvent(-1, "Radio1selected")
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
WinSetOnTop($g_szVersion, "", 1)
#endregion ### END Koda GUI section ###
Dim $i, $LorR, $times, $second, $count
Dim $list[12] = ["F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "Esc"]
Dim $condition = 0
Dim $rate = 10
Dim $hotleft = "F9"
Dim $hotright = "F10"
Dim $hotstop = "F11"
freshcombolist()
HotKeySet("{" & $hotleft & "}", "leftstart")
HotKeySet("{" & $hotright & "}", "rightstart")
HotKeySet("{" & $hotstop & "}", "clickstop")
While 1
If $i = 1 Then
Select
Case $condition = 0 ;当选择无时,直接点击
MouseClick($LorR)
Case $condition = 1 ;限定次数
If $times > $count Then
MouseClick($LorR)
$count = $count + 1
GUICtrlSetData($Input2, $times - $count)
Else
clickstop()
GUICtrlSetData($Input2, $times)
$count = 0
EndIf
EndSelect
Sleep(10000 / $rate)
EndIf
WEnd
Func leftstart()
$LorR = "left"
GUICtrlSetBkColor($Label2, 0xFF0000)
GUICtrlSetBkColor($Label3, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetBkColor($Label4, $GUI_BKCOLOR_TRANSPARENT)
$i = 1
EndFunc ;==>leftstart
Func rightstart()
$LorR = "right"
$i = 1
GUICtrlSetBkColor($Label2, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetBkColor($Label3, 0xFF0000)
GUICtrlSetBkColor($Label4, $GUI_BKCOLOR_TRANSPARENT)
EndFunc ;==>rightstart
Func clickstop()
$i = 0
GUICtrlSetBkColor($Label2, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetBkColor($Label3, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetBkColor($Label4, 0xFF0000)
EndFunc ;==>clickstop
Func Form1Close()
Exit
EndFunc ;==>Form1Close
Func Input1Change()
$rate = GUICtrlRead($Input1)
EndFunc ;==>Input1Change
Func Combo1Change()
;~ 取消原有的热键,并重新定义新的热键
HotKeySet("{" & $hotleft & "}")
$hotleft = GUICtrlRead($Combo1)
HotKeySet("{" & $hotleft & "}", "leftstart")
freshcombolist()
EndFunc ;==>Combo1Change
Func Combo2Change()
HotKeySet("{" & $hotright & "}")
$hotright = GUICtrlRead($Combo2)
HotKeySet("{" & $hotright & "}", "rightstart")
freshcombolist()
EndFunc ;==>Combo2Change
Func Combo3Change()
HotKeySet("{" & $hotstop & "}")
$hotstop = GUICtrlRead($Combo3)
HotKeySet("{" & $hotstop & "}", "clickstop")
freshcombolist()
EndFunc ;==>Combo3Change
Func freshcombolist()
;~ 设置列表框1、2、3里的内容,不能与正在使用的热键重复
Dim $n, $combolist = "|"
For $n In $list
If $n <> $hotright And $n <> $hotstop Then
$combolist = $combolist & $n & "|"
EndIf
Next
GUICtrlSetData($Combo1, $combolist, $hotleft)
Dim $n, $combolist = "|"
For $n In $list
If $n <> $hotleft And $n <> $hotstop Then
$combolist = $combolist & $n & "|"
EndIf
Next
GUICtrlSetData($Combo2, $combolist, $hotright)
Dim $n, $combolist = "|"
For $n In $list
If $n <> $hotleft And $n <> $hotright Then
$combolist = $combolist & $n & "|"
EndIf
Next
GUICtrlSetData($Combo3, $combolist, $hotstop)
EndFunc ;==>freshcombolist
;~ 4.0新增功能
;~ 限定次数
Func Input2Change()
;~ 当文本框内容不为空,则radio1未选
If GUICtrlRead($Input2) <> "" Then ;判断是否为空
$times = GUICtrlRead($Input2)
$condition = 1
GUICtrlSetState($Radio1, $GUI_UNCHECKED)
EndIf
EndFunc ;==>Input2Change
;~ 当radio1选择,则input2为空
Func Radio1selected()
$condition = 0
GUICtrlSetData($Input2, "")
EndFunc ;==>Radio1selected