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

#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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值