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

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

#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





评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值