dcjohnston Posted September 23, 2008 Posted September 23, 2008 (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 September 23, 2008 by dcjohnston
ssubirias3 Posted September 23, 2008 Posted September 23, 2008 . . . 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now