您的位置:首页 > 其它

autohotkey+txt (3)+获得鼠标坐标

2013-10-22 00:31 281 查看
#x::
Ext:=1
MouseGetPos, X,Y
MsgBox ,%X%,%Y%,退出
return

;Send, {LAlt Down}
;send {PGDN}
;send {lalt up}
;Sleep, 100

#z:: ;Run www.autohotkey.com
SetTitleMatchMode 2
Num:=0
Err:=0
Ext:=0
;tt=
ttt=
i:=0
FileDelete ,D:\temp.txt
Loop
{
times:=0
MouseClick, left, 250,  190+20*i,1 ;;;;;;;;;;;;;;;;
Sleep 200
clipboard=
Loop
{
;MsgBox %tt%
if(Ext=1)
return
Sleep, 500
send  ^c
Sleep 200   ;;;;;;;;发指令需要时间important!!!
if( StrLen(Clipboard)<1)
{
times:=times+1
if(times>=20)
{
MsgBox 选择销售单超时或完成
;Ext:=0
return
}
}
else
break
}
if(Ext=1)
{
MsgBox 强制退出
;Ext:=0
return
}
if (ttt=Clipboard )
{
MsgBox 数据处理完成
return
}
tt=%Clipboard%
;send #c
;Sleep 500  ;;;;;;;;发指令需要时间important!!!
;--------------------------------------------
{
FileDelete ,D:\temp.txt

FileAppend,%Clipboard%, D:\temp.txt
FileAppend,`n, D:\temp.txt
;msgbox 销售单数据已经拷贝入D:\temp.txt,请点击下面的单据统计销售件数
}
;--------------------------------------------
MouseClick, Left ,250,633,1 ;;;;;;;;;;;;
Sleep, 200
;send #v
;Sleep 100 ;;;;;;;;;
;--------------------------------------------
{
clipboard=
send  ^c
Sleep 200
ttt=%Clipboard%
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,`n, D:\temp.txt
send,{Down}
sleep,500
send,^c
Sleep 200
loop
{
if (ttt=Clipboard)
{
break
}
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,`n, D:\temp.txt
send,{Down}
sleep,500
send,^c
Sleep 200
}
IfWinExist 四川科伦每天销售发货明细
{
WinActivate
WinWaitActive
send ^+l
Sleep 1000
}
else{
MsgBox,四川科伦每天销售发货明细没打开
Err:=1
return
}
}
;--------------------------------------------
;if(Err=0){
WinMinimize,四川科伦每天销售发货明细
;}
;break	;;;;;;;;不管是否成功都需要退出一个循环!!!
Num:=Num+1
if(Num>=50)
{
MsgBox 销售单达到了50条,请确认
break
}
if(i<18)
{
i:=i+1
}
else
{
MouseClick, Left ,1651,543,1 ;;;;;;;;;;;;
Sleep 200
}
}
return
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: