[AHK]文华财经 补数据 自动点击 下载按钮

来源:互联网 发布:软件系统网络拓扑图 编辑:程序博客网 时间:2024/04/29 21:19

有用文华财经 ,补数据嫌烦的吗,写了个小脚本,自动点击下载按钮

#Persistent#Singleinstance force#f1::i:=0outer:Loop{    ;如果出现没有数据对话框结束点击动作循环    IfWinExist,《文华财经》 ahk_exe wh8.exe,指定的时段没有数据。    {        ControlClick,Button1,《文华财经》 ahk_exe wh8.exe         break    }    ;识别 下载 按钮 状态是否可以点击    controlget,outputvar,Enabled,,Button1,补数据 ahk_exe wh8.exe     if outputvar=1  ;若可以点击    {        ;点击下载按钮        ControlClick,Button1,补数据 ahk_exe wh8.exe         i+=1        ToolTip,已经点击%i%次。        ;等待直到不能点击        Loop{            controlget,outputvar,Enabled,,Button1,补数据 ahk_exe wh8.exe             Sleep,500            ControlClick,Button1,补数据 ahk_exe wh8.exe             Sleep,500            ControlFocus,Button1,补数据 ahk_exe wh8.exe         }until outputvar=0    }    else                    ;若禁止点击    {            ;等待直到能点击        Loop{            controlget,outputvar,Enabled,,Button1,补数据 ahk_exe wh8.exe             Sleep,1000            ;等待过程如果提示 没有数据则结束点击动作。            IfWinExist,《文华财经》 ahk_exe wh8.exe,指定的时段没有数据。            {                ControlClick,Button1,《文华财经》 ahk_exe wh8.exe                 break outer            }        }until outputvar=1    }}MsgBox 下载完成!ToolTipreturn



0 0
原创粉丝点击