Sign in to follow this  
Followers 0
dcjohnston

Need a resident button clicker...

2 posts in this topic

#1 ·  Posted (edited)

I have a website that allows someone to set a timer that starts an executable when the timer runs out. This executable requires someone to click past two security warnings when the timer runs out. I want to have Autoit executable do this click.

I need a simple utility that runs in the system tray that will wait until the security windows come up click the OK button then exit. Below is my source code.

For some reason it works very inconsistently. Is there a way to have this run in the system tray, wait for the windows, send the mouse clicks then exit?

Do

WinWaitActive("File Download - Security Warning"); first security warning, press move right twice then hit enter

Send("{RIGHT}",1)

Send("{RIGHT}",1)

Send("{ENTER}",1)

WinWait("Internet Explorer - Security Warning"); second warning, press arrow button once then enter.

Send("{RIGHT}",1)

;Send("{ENTER}")

Until WinClose("Defrag Beginning -- Webpage Dialog"); final webpage that announces the process completed

Edited by dcjohnston

Share this post


Link to post
Share on other sites



. . . For some reason it works very inconsistently. Is there a way to have this run in the system tray, wait for the windows, send the mouse clicks then exit? . . .

Try adding something like this in in place of your WinWait...() commands:

WinWait()
    If Not WinActive() Then WinActivate()
    WinWaitActive()

For the second part look in the Help file for While...Wend examples. This will keep the program active until your defined conditions are met. Btw, you'll need to complete the above example code. Cutting and pasting it into your script will not help/work for you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0