omac12 Posted March 15, 2007 Share Posted March 15, 2007 Hello, I've really just started with AutoIt v3. I was attempting to automate an update to a program. I was able to activate the program and send a button click to the Next button using !n. The program connects and gets a list of updates and updates them. Then the next screen is displayed. The Finish button has no shortcut key so I can only click it using a mouseclick. The problem is that I don't know how long the downloading and updating will take so I don't know when the next button will be clicked. Is there a way to tell when the dialog displays the next screen so that I can send the mouseclick then? Thank you, Al Link to comment Share on other sites More sharing options...
jinxter Posted March 15, 2007 Share Posted March 15, 2007 from the manual: WinWaitActive ( "title" [, "text" [, timeout]] ) > there are 10 types of people in the world, those who understand binary and those who don't. Link to comment Share on other sites More sharing options...
herewasplato Posted March 15, 2007 Share Posted March 15, 2007 ...Is there a way to tell when the dialog displays the next screen so that I can send the mouseclick then?...Take a look at the WinWait function in the help file. See if you can locate any window text that is unique to the window of interest to use with WinWait. Use the tool named "AutoIt Window Info" to copy/paste the info into your script for less errors/typos. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
omac12 Posted March 15, 2007 Author Share Posted March 15, 2007 Actually, I used the winwaitactive command that I got from the notepad tutorial. I'm sorry, I should have posted the code that I was using. run("c:\program files\symantec antivirus\VPDN_LU.exe") WinWaitActive("LiveUpdate") ;send Alt + N (in AutoIt the Alt key is represented by the exclamation point) send("!n") MouseClick("Finish") The program starts up correctly and clicks the next button. After it updates I try to click the Finish button to close it, but I cannot. The problem is clicking the close button. I don't want to just close the dialog without knowing that it made it to the Finish screen as I don't want to stop it in the middle of updating. Al Link to comment Share on other sites More sharing options...
SadBunny Posted March 15, 2007 Share Posted March 15, 2007 from the manual: WinWaitActive ( "title" [, "text" [, timeout]] ) Maybe there is not a new window he/she can wait for because it is in the same window, but a button becomes available when the download is finished? If that's the case, if it has a specific button name or class name or anything else specific you can test on (use the AU3Info tool to find that out), keep some loop running until the button is present or has some state you want it to have (using for instance ControlCommand with IsEnabled if it's a 'next' button that goes from 'greyed-out' (disabled) state to 'available' (enabled) like I need for some installshield automations.) Hope it helps. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
omac12 Posted March 15, 2007 Author Share Posted March 15, 2007 Thank you, SadBunny, that was what I meant. I just fired up Au3Info and am plumbing the depths of that dialog. I'm embarrassed as it seems rather obvious now that you've said it. I will read some more and practice some more before I post again. Thank you very much for your help. :-) Al (male) Link to comment Share on other sites More sharing options...
SadBunny Posted March 15, 2007 Share Posted March 15, 2007 Thank you, SadBunny, that was what I meant. I just fired up Au3Info and am plumbing the depths of that dialog. I'm embarrassed as it seems rather obvious now that you've said it. I will read some more and practice some more before I post again. Thank you very much for your help. :-)Al (male)No problem, good luck, in case of more questions just post here and probably people will in general try to help you. At least you asked nicely and actually provided some information to explain your problem Cuz see... Just not knowing something after you searched yourself (seems to be your category) is never bad. Not willing to try or learn anything, or just demanding that others code for you (like some other people on this forum) IS bad and will in general get you bashed on this forum! Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
herewasplato Posted March 15, 2007 Share Posted March 15, 2007 omac12, You might want to consider using this one line of code:Run('"C:\Program Files\Symantec AntiVirus\VPDN_LU.exe" /s')That will run the updates without any screens to mess with... If an update is all that you were attempting to automate, then you might want to consider adding a scheduled task to run that silent update as often as you would like. The AV tool can run it once per day, but it seems that you want to run it more often. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
SadBunny Posted March 15, 2007 Share Posted March 15, 2007 omac12, You might want to consider using this one line of code:Run('"C:\Program Files\Symantec AntiVirus\VPDN_LU.exe" /s')That will run the updates without any screens to mess with... If an update is all that you were attempting to automate, then you might want to consider adding a scheduled task to run that silent update as often as you would like. The AV tool can run it once per day, but it seems that you want to run it more often. Heheh, nice Since I work for Norman which is a direct competitor of Norton, I wouldn't know the NAV commandline parameters! If anyone has any questions about Norman Virus Control feel free to ask though! Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
omac12 Posted March 16, 2007 Author Share Posted March 16, 2007 Thank you herewasplato and SadBunny. Simple is better. I had cobbled together something that was obviously overkill. I appreciated the exercise though. I find AutoIt syntax to be pretty close to vbscript which I'm familiar with so I'm concentrating on learning the functions and parameters. So far I'm liking it. It doesn't hurt to have helpful people donating their time. Al Link to comment Share on other sites More sharing options...
SadBunny Posted March 16, 2007 Share Posted March 16, 2007 Thank you herewasplato and SadBunny. Simple is better. I had cobbled together something that was obviously overkill. I appreciated the exercise though. I find AutoIt syntax to be pretty close to vbscript which I'm familiar with so I'm concentrating on learning the functions and parameters. So far I'm liking it. It doesn't hurt to have helpful people donating their time.AlJust don't forget to post your postal address so we can send you the bill! Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
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