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

    xiaoxiao2022-06-30  42

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

    #Persistent #Singleinstance force #f1:: i:=0 outer: 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 下载完成! ToolTip return

    转载请注明原文地址: https://ju.6miu.com/read-1125641.html

    最新回复(0)