您的位置:首页 > 其它

autohotkey txt

2013-10-17 00:08 281 查看
#x::Ext:=1
;Send, {LAlt Down}
;send {PGDN}
;send {lalt up}
;Sleep, 100

#z:: ;Run www.autohotkey.com
SetTitleMatchMode 2
Num:=0
Err:=0
Ext:=0
tt=
FileDelete ,D:\temp.txt
Loop
{
times:=0
MouseClick, left,  335,  190,2
clipboard=
Loop
{
if(Ext=1)
break
Sleep, 500
send  ^c
Sleep 100   ;;;;;;;;发指令需要时间important!!!
if( StrLen(Clipboard)<1)
{
times:=times+1
if(times>=20)
{
MsgBox 选择销售单超时
;break
return
}
}
else
break
}
if(Ext=1)
{
MsgBox 强制退出
Ext:=0
break
}
if (tt=Clipboard)
{
MsgBox 数据处理完成
tt=
break
}
tt=%Clipboard%
;send #c
;Sleep 500  ;;;;;;;;发指令需要时间important!!!
;--------------------------------------------
{
FileDelete ,D:\temp.txt
;send ^c  ;;;;
;Sleep 100 ;;;;
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,;, D:\temp.txt
MouseClick, Left ,570,235,2
sleep 200
send ^a
Sleep 100
send  ^c
Sleep 100
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,;, D:\temp.txt
MouseClick, Left ,1580,235,2
sleep 200
send ^a
Sleep 100
send  ^c
Sleep 100
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,;, D:\temp.txt
MouseClick, Left ,335,280,2
sleep 200
send ^a
Sleep 100
send  ^c
Sleep 100
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,;, D:\temp.txt
MouseClick, Left ,570,190,2
sleep 200
send ^a
Sleep 100
send  ^c
Sleep 100
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,`n, D:\temp.txt
;msgbox 销售单数据已经拷贝入D:\temp.txt,请点击下面的单据统计销售件数
}
;--------------------------------------------
MouseClick, Left ,765,390,1
Sleep, 200
;send #v
;Sleep 100 ;;;;;;;;;
;--------------------------------------------
{
send ^a
Sleep 100
send ^c
ttt=%Clipboard%
FileAppend,%Clipboard%, D:\temp.txt
;FileAppend,`n, D:\temp.txt
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
}
Send, {LAlt Down}
send {PGDN}
send {lalt up}
Sleep, 100
}
return

#c::
SetTitleMatchMode 2
;IfWinActive,UFIDA NewCentury
{
FileDelete ,D:\temp.txt
send ^c  ;;;;
Sleep 100 ;;;;
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,;, D:\temp.txt
MouseClick, Left ,570,235,2
sleep 200
send ^a
Sleep 100
send  ^c
Sleep 100
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,;, D:\temp.txt
MouseClick, Left ,1580,235,2
sleep 200
send ^a
Sleep 100
send  ^c
Sleep 100
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,;, D:\temp.txt
MouseClick, Left ,335,280,2
sleep 200
send ^a
Sleep 100
send  ^c
Sleep 100
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,;, D:\temp.txt
MouseClick, Left ,570,190,2
sleep 200
send ^a
Sleep 100
send  ^c
Sleep 100
FileAppend,%Clipboard%, D:\temp.txt
FileAppend,`n, D:\temp.txt
;msgbox 销售单数据已经拷贝入D:\temp.txt,请点击下面的单据统计销售件数
}
;else
;	msgbox,UFIDA NewCentury 没激活
return

#v::
SetTitleMatchMode 2
;IfWinActive,UFIDA NewCentury
{
send ^a
Sleep 100
send ^c
ttt=%Clipboard%
FileAppend,%Clipboard%, D:\temp.txt
;FileAppend,`n, D:\temp.txt
IfWinExist 四川科伦每天销售发货明细
{
WinActivate
WinWaitActive
send ^+l
}
else{
MsgBox,四川科伦每天销售发货明细没打开
Err:=1
}
}
;else
;	msgbox,UFIDA NewCentury 没激活
return
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: