奇怪了,mousemove 没反应,咋回事呢
本帖最后由 fenhanxue 于 2013-10-17 19:19 编辑Dim $xy1,$xy2,$xy3,$xy4,$xy5
MsgBox(0,"选定鼠标位置","下面开始鼠标位置的初始化设置")
MsgBox(0,"鼠标位置初始化","鼠标移到 位置1,按回车")
$xy1= MouseGetPos()
MsgBox(0,"鼠标位置初始化","鼠标移到 位置2,按回车")
$xy2 = MouseGetPos()
MsgBox(0,"鼠标位置初始化","鼠标移到 位置3,按回车")
$xy3= MouseGetPos()
MsgBox(0,"鼠标位置初始化","鼠标移到 位置4,按回车")
$xy4= MouseGetPos()
MsgBox(0,"鼠标位置初始化","鼠标移到 位置5,按回车")
$xy5 = MouseGetPos()
$fie = FileOpen("location.txt",1)
FileWrite($fie,$xy1&","& $xy1&@CRLF)
FileWrite($fie,$xy2&","& $xy2&@CRLF)
FileWrite($fie,$xy3&","& $xy3&@CRLF)
FileWrite($fie,$xy4&","& $xy4&@CRLF)
FileWrite($fie,$xy5&","& $xy5&@CRLF)
FileClose($fie)
MsgBox(0,"重复移动","下面鼠标将重复刚才选的五个坐标移动")
MouseMove($xy1,$xy1,10)
MouseMove($xy2,$xy2,10)
MouseMove($xy3,$xy3,10)
MouseMove($xy4,$xy4,10)
MouseMove($xy5,$xy5,10)如果用下面的代码,则可以Dim $xy1,$xy2,$xy3,$xy4,$xy5
MsgBox(0,"选定鼠标位置","下面开始鼠标位置的初始化设置")
MsgBox(0,"鼠标位置初始化","鼠标移到 位置1,按回车")
$xy1= MouseGetPos()
MsgBox(0,"鼠标位置初始化","鼠标移到 位置2,按回车")
$xy2 = MouseGetPos()
MsgBox(0,"鼠标位置初始化","鼠标移到 位置3,按回车")
$xy3= MouseGetPos()
MsgBox(0,"鼠标位置初始化","鼠标移到 位置4,按回车")
$xy4= MouseGetPos()
MsgBox(0,"鼠标位置初始化","鼠标移到 位置5,按回车")
$xy5 = MouseGetPos()
$fie = FileOpen("location.txt",1)
FileWrite($fie,$xy1&","& $xy1&@CRLF)
FileWrite($fie,$xy2&","& $xy2&@CRLF)
FileWrite($fie,$xy3&","& $xy3&@CRLF)
FileWrite($fie,$xy4&","& $xy4&@CRLF)
FileWrite($fie,$xy5&","& $xy5&@CRLF)
FileClose($fie)
MsgBox(0,"重复移动","下面鼠标将重复刚才选的五个坐标移动")
MouseMove(100,100,10)
MouseMove(200,200,10)
MouseMove(300,300,10)
MouseMove(400,400,10)
MouseMove(500,500,10) 代码没问题,鼠标移动速度是1,瞬间就过去了是不是没看见,你设成10或者不设看看
还有可能是WIN7用户权限的问题,我碰到过,adminstrator组成员,但只执行mousemove,不执行mouseclick,改权限后OK了就没深究 回复 2# Someonesol
也不是的,我如果把下面代码中,$xy ——$xy ,换成具体的阿拉伯数字,则行的通,在上述代码,在win7,xp下都不能用 MouseMove($xy1,$xy1,1)
MouseMove($xy2,$xy2,1)
MouseMove($xy3,$xy3,1)
MouseMove($xy4,$xy4,1)
MouseMove($xy5,$xy5,1) 检查下电脑和au3程序吧,我直接复制F5运行正常 继续坐等牛人解答。。。 建议你用_ArrayDisplay($xy1)看看记录里面有没有值
没有的值话,如果已经调用这个#include <array.au3> ,那就坐等高人吧 回复 6# anypac
$xy1 的值都是有的,愁死拉 光看这一段的话 是可以运行的 楼主检查下 前后的码吧 没发现什么问题。。。等高手解答。
页:
[1]