试试强制安装一个串口鼠标驱动 刚才误会了我还以为是你要在没鼠标的电脑上操作HotKeySet ("{F11}","_start")
$sxxx=0
$time=0
_start()
$timeline1=90;鼠标加速时间1
$stepline1=3;鼠标速度1
$stepline2=15;鼠标速度2
While 1
WEnd
Func _start()
If $sxxx=0 Then
TrayTip('模拟鼠标启用',"F11启停,空格鼠标左键,回车鼠标右键",5)
HotKeySet ("{UP}","_UP")
HotKeySet ("{DOWN}","_DOWN")
HotKeySet ("{LEFT}","_LEFT")
HotKeySet ("{RIGHT}","_RIGHT")
HotKeySet ("{ENTER}","_ENTER")
HotKeySet ("{SPACE}","_SPACE")
$sxxx=1
Else
TrayTip('已停用模拟鼠标'," ",2)
HotKeySet ("{UP}")
HotKeySet ("{DOWN}")
HotKeySet ("{LEFT}")
HotKeySet ("{RIGHT}")
HotKeySet ("{ENTER}")
HotKeySet ("{SPACE}")
$sxxx=0
EndIf
EndFunc
Func _UP()
$mouse=MouseGetPos ()
$ti=TimerDiff($time)
$time=TimerInit()
If $ti > 0 And $ti < $timeline1 Then
MouseMove ( $mouse[0],$mouse[1]-$stepline2,0)
ElseIf $ti >= $timeline1 Then
MouseMove ( $mouse[0],$mouse[1]-$stepline1,0)
EndIf
EndFunc
Func _DOWN()
$mouse=MouseGetPos ()
$ti=TimerDiff($time)
$time=TimerInit()
If $ti > 0 And $ti < $timeline1 Then
MouseMove ( $mouse[0],$mouse[1]+$stepline2,0)
ElseIf $ti >= $timeline1 Then
MouseMove ( $mouse[0],$mouse[1]+$stepline1,0)
EndIf
EndFunc
Func _LEFT()
$mouse=MouseGetPos ()
$ti=TimerDiff($time)
$time=TimerInit()
If $ti > 0 And $ti < $timeline1 Then
MouseMove ( $mouse[0]-$stepline2,$mouse[1],0)
ElseIf $ti >= $timeline1 Then
MouseMove ( $mouse[0]-$stepline2,$mouse[1],0)
EndIf
EndFunc
Func _RIGHT()
$mouse=MouseGetPos ()
$ti=TimerDiff($time)
$time=TimerInit()
If $ti > 0 And $ti < $timeline1 Then
MouseMove ( $mouse[0]+$stepline2,$mouse[1],0)
ElseIf $ti >= $timeline1 Then
MouseMove ( $mouse[0]+$stepline2,$mouse[1],0)
EndIf
EndFunc
Func _ENTER()
MouseClick("right")
EndFunc
Func _SPACE()
MouseClick("left")
EndFunc
呢 无聊写了下面这些代码 |