Hannibal Posted August 4, 2005 Share Posted August 4, 2005 Im very new to this program but am loving the possibilities. I am probably missing something simple but cant seem to figure out what it is so any help ya can provide would be appreciated!!!I am trying to auto install 2 programs with AutoIt (Microsoft AntiSpyware & Adobe Reader 7) My issues is it works for the initial security warning box but as soon as it gets to the first box of the install it just sits there and I get the scrip paused icon in the systray. I have tried it on several different machines with the same result. Any suggestions????? THX in advanceHeres the code I have for each:Run("MicrosoftAntiSpywareInstall.exe")WinWaitActive("Open File - Security Warning")Send("!r")WinWaitActive("Microsoft AntiSpyware", "Welcome to the Installation Wizard for Microsoft AntiSpyware")Send("!n")WinWaitActive("Microsoft AntiSpyware", "Please read the following license agreement carefully")Send("!a")Send("{ENTER}")WinWaitActive("Microsoft AntiSpyware", "Click Next to install to this folder")Send("!i")WinWaitActive("Microsoft AntiSpyware", "The wizard is ready to begin installation")Send("{ENTER}")WinWaitActive("Microsoft AntiSpyware", "The installation wizard has successfully installed Microsoft AntiSpyware")Send("!f")Run("AdobeReader7.exe")WinWaitActive("Open File - Security Warning")Send("!r")WinWaitActive("Adobe Reader 7.0 - Setup")Send("!n")WinWaitActive("Adobe Reader 7.0 - Setup", "This program is protected by copyright law and international treaties")Send("!n")WinWaitActive("Adobe Reader 7.0 - Setup", "Change to install to a different folder")Send("!n")WinWaitActive("Adobe Reader 7.0 - Setup", "Ready to Install the Program")Send("!i")WinWaitActive("Adobe Reader 7.0 - Setup", "Setup has successfully installed Adobe Reader")Send("!f") Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 4, 2005 Moderators Share Posted August 4, 2005 (edited) Try this: expandcollapse popupOpt("WinTitleMatchMode", 4) Run("MicrosoftAntiSpywareInstall.exe") WinWait("Open File - Security Warning") Sleep(100) Send("!r") WinWait("Microsoft AntiSpyware", "Welcome to the Installation Wizard for Microsoft AntiSpyware") Sleep(100) Send("!n") WinWait("Microsoft AntiSpyware", "Please read the following license agreement carefully") Sleep(100) Send("!a") Send("{ENTER}") WinWait("Microsoft AntiSpyware", "Click Next to install to this folder") Sleep(100) Send("!i") WinWait("Microsoft AntiSpyware", "The wizard is ready to begin installation") Sleep(100) Send("{ENTER}") WinWait("Microsoft AntiSpyware", "The installation wizard has successfully installed Microsoft AntiSpyware") Sleep(100) Send("!f") Run("AdobeReader7.exe") WinWait("Open File - Security Warning") Sleep(100) Send("!r") WinWait("Adobe Reader 7.0 - Setup") Sleep(100) Send("!n") WinWait("Adobe Reader 7.0 - Setup", "This program is protected by copyright law and international treaties") Sleep(100) Send("!n") WinWait("Adobe Reader 7.0 - Setup", "Change to install to a different folder") Sleep(100) Send("!n") WinWait("Adobe Reader 7.0 - Setup", "Ready to Install the Program") Sleep(100) Send("!i") WinWait("Adobe Reader 7.0 - Setup", "Setup has successfully installed Adobe Reader") Sleep(100) Send("!f") Good Luck Edited August 4, 2005 by ronsrules Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Hannibal Posted August 5, 2005 Author Share Posted August 5, 2005 thanks for the suggestion but both still hang at their first initial window. any other suggestions? Link to comment Share on other sites More sharing options...
LxP Posted August 5, 2005 Share Posted August 5, 2005 Try running AutoIt3 Window Info on the window in question and copy its interpretation of the window title exactly to your script. The window might be using a non-standard character for the hyphen or it may have a space at the beginning or something else subtle. Link to comment Share on other sites More sharing options...
ubernewb Posted August 5, 2005 Share Posted August 5, 2005 (edited) I am having a similar (actually the same) problem trying to automate an OfficeTracker install. I am very new at this and it is giving me fits. The OfficeTracker installer opens up a full-sized window in the background and a smaller dialogue box in the foreground. They both have the same title! Could this be a problem for WinWaitActive? Maybe this is a similar problem to the adobe install problem? edit: added code, maybe this will help... Run("c:\Office Tracker Windows\Office Tracker Installer.exe") ; This next line is added because the program flippin freaks out without it Sleep(3000) ; Waits for the first Install dialogue box to become active, ; sends the "Enter" command to slect Next. WinWaitActive("Office Tracker - InstallShield Wizard", "The InstallShield® Wizard will install Office Tracker") Send("{ENTER}") ; Waits for the License Agreement to become active and sends ALT+A to accept the agreement. ; Then sends ALT+N to select Next. WinWaitActive("Office Tracker - InstallShield Wizard", "License Agreement") Send("!a") Send("!n") Edited August 5, 2005 by ubernewb Maybe if I typed something here you would get an idea of what kind of person I am? Link to comment Share on other sites More sharing options...
Hannibal Posted August 5, 2005 Author Share Posted August 5, 2005 Try running AutoIt3 Window Info on the window in question and copy its interpretation of the window title exactly to your script. The window might be using a non-standard character for the hyphen or it may have a space at the beginning or something else subtle.<{POST_SNAPBACK}>Thanks, but its a no go. I had tried this as well. Still gets to that first window and just hangs on both programs. Nothing else is running and I dont even touch the computer after I click the script. The search goes on!!!! Link to comment Share on other sites More sharing options...
herewasplato Posted August 5, 2005 Share Posted August 5, 2005 ...both still hang at their first initial window.<{POST_SNAPBACK}>manually bring up the "first initial window"start the "AutoIt Window Info" toolmake sure that the "first initial window" is in focuspress CTRL-ALT-F to pause the display of the "AutoIt Window Info" toolcopy the entire contents of the "AutoIt Window Info" tool to the windows clipboardpaste the entire contents of the "AutoIt Window Info" tool to your next postOnce we get that info from you......I would suggest that we all work with a tiny test segment like:$return = WinWait("Open File - Security Warning","",2);2 second timeout ;Success: Returns 1. ;Failure: Returns 0 if timeout occurred. MsgBox(0,"",$return)later... [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Hannibal Posted August 5, 2005 Author Share Posted August 5, 2005 (edited) Once we get that info from you...Thanks for taking the time to read and reply!!!Heres the cut and paste for Microsoft AntiSpyware...>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Microsoft AntiSpywareClass: MsiDialogCloseClassSize: X: 708 Y: 396 W: 504 H: 379>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 887 Y: 412Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0x405D98 Dec: 4218264>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size:Control ID:ClassNameNN:Text:>>>>>>>>>>> Status Bar Text <<<<<<<<<<<>>>>>>>>>>> Visible Window Text <<<<<<<<<<<&Next >Cancel< &BackWARNING: This computer program is protected by copyright law and international treaties. Unauthorized reproduction or distribution of this program, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law.Microsoft AntiSpyware is powerful anti-spyware software that helps to detect and remove spyware and adware from your computer. The Installation Wizard will install Microsoft AntiSpyware on your computer. To continue, click Next.NewBinary5Welcome to the Installation Wizard for Microsoft AntiSpyware>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<Heres the cut and paste from Adobe Reader 7>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Adobe Reader 7.0 - SetupClass: MsiDialogNoCloseClassSize: X: 708 Y: 396 W: 504 H: 379>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 1071 Y: 411Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0x7E9FCD Dec: 8298445>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size:Control ID:ClassNameNN:Text:>>>>>>>>>>> Status Bar Text <<<<<<<<<<<>>>>>>>>>>> Visible Window Text <<<<<<<<<<<&Next >&Cancel< &BackInstallShieldInstallShieldReaderSpalsh>>>>>>>>>>> Hidden Window Text <<<<<<<<<<< Edited August 5, 2005 by Hannibal Link to comment Share on other sites More sharing options...
herewasplato Posted August 5, 2005 Share Posted August 5, 2005 You are welcome... What does this return: $return = WinWait("Adobe Reader 7.0 - Setup","",2);2 second timeout ;Success: Returns 1. ;Failure: Returns 0 if timeout occurred. MsgBox(0,"",$return) What version of AutoIt are we working with? 3.1.1? or beta? (Should not matter, but thought that I would ask.) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Hannibal Posted August 5, 2005 Author Share Posted August 5, 2005 going to show my noobish ability in coding by asking where should I use that script. Link to comment Share on other sites More sharing options...
herewasplato Posted August 5, 2005 Share Posted August 5, 2005 (edited) going to show my noobish ability in coding by asking where should I use that script.<{POST_SNAPBACK}>You just open a new AutoIt script and run the code by itself - the msgbox showed a 1 for me earlier today. The script found the window as expected....or if you already have a lot of lines of code written - just insert it above where you think the problem is and add an EXIT after it - just to debug the script.Edit: a msgbox is an easy debug tool... it would also help if you were using the SciTE editor than has been setup for AutoIt:http://www.autoitscript.com/autoit3/scite/ Edited August 5, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Hannibal Posted August 5, 2005 Author Share Posted August 5, 2005 I ran it at the stuck screen and it returned a 1. When I edit the scripts it tells me I am running version 3.1.0, I just downloaded this yesterday so Im learning as fast as I can...or really as often as my boss isnt in the room! LOL Thx Link to comment Share on other sites More sharing options...
herewasplato Posted August 5, 2005 Share Posted August 5, 2005 I ran it at the stuck screen and it returned a 1. When I edit the scripts it tells me I am running version 3.1.0, I just downloaded this yesterday so Im learning as fast as I can...or really as often as my boss isnt in the room! LOL Thx<{POST_SNAPBACK}>BTW, I did not mean to imply that you are not learning AutoIt quickly... even before the quoted post above, I thought better of my use of words like "You just open...".You "just" have to understand what I'm doing on this end - work! (and my boss is sitting a few feet from me). Also, "work" intterrupts every 3.5 minutes, so my posts might seem a bit disjointed.Take a look in the help file >> contents >> top level page. Is it 3.1.0 or 3.1.1?(Again - this should not matter, but seems odd that the default template is 3.1.0.)Now, back to your script. If you ran it and it returned a 1... then what is your next problem :-)Add this OPT line to the top of your main script:AutoItSetOption("TrayIconDebug", 1) ;0-offIt is another debug tool...Run your full script and "mouse-over" the icon in the system tray. It should tell you what line of code the script is hanging (waiting) on. Using Scrite yet? It really helps on syntax errors and line numbers (and a bunch of other neat stuff). [From within SciTE, hit F5 to run the script - it will check some stuff for you before running the code.] [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Hannibal Posted August 5, 2005 Author Share Posted August 5, 2005 I know you didnt imply that was simply trying to make a joke about myself! Dont worry about your posts I am understanding them pretty good. The help file states its v3.1.1 and if ya have to work dont worry about me. Life comes first man. I have downloaded and installed Scrite. Ill report back with the results soon, I have a short meeting to attend. THX!! Link to comment Share on other sites More sharing options...
herewasplato Posted August 5, 2005 Share Posted August 5, 2005 I know you didnt imply that was simply trying to make a joke about myself! Dont worry about your posts I am understanding them pretty good. The help file states its v3.1.1 and if ya have to work dont worry about me. Life comes first man. I have downloaded and installed Scrite. Ill report back with the results soon, I have a short meeting to attend. THX!!<{POST_SNAPBACK}>Work and posting to the forum not a problem, just work is annoying...I'm filling in for someone else for part of the day and I get to:change a part click a mousechange a part click a mousechange a part click a mousechange a part click a mouse...every 3.5 minutesI was not cut out for this...The forum is a nice diversion between parts. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Hannibal Posted August 5, 2005 Author Share Posted August 5, 2005 ALRIGHT!!!! We got somewhere now!!! I have it auto installing Norton Antivirus Corp and Adobe Reader 7 now!! The final code for Adobe install looks like: AutoItSetOption("TrayIconDebug", 1) ;0-off Run("AdobeReader7.exe") Send("!r") WinWaitActive("Adobe Reader 7.0 - Setup", "InstallShield") Send("!n") WinWaitActive("Adobe Reader 7.0 - Setup", "This program is protected by copyright law and international treaties") Send("!n") WinWaitActive("Adobe Reader 7.0 - Setup", "Change to install to a different folder") Send("!n") WinWaitActive("Adobe Reader 7.0 - Setup", "Ready to Install the Program") Send("!i") WinWaitActive("Adobe Reader 7.0 - Setup", "Setup has successfully installed Adobe Reader") Send("!f") I removed the WinWaitActive("Open File - Security Warning") from it. The debug popup said thats what was holding it up. GOOD TIP!! THX Im working on the Microsoft Antispyware now. It was holding up at the same point so I removed that line and it continued on the stalls at another point. Gimme a bit to play with it! Link to comment Share on other sites More sharing options...
Hannibal Posted August 5, 2005 Author Share Posted August 5, 2005 Got It. They are all working now. Had my !i and !n backwards. Stupid me LOL Thanks for everyones help!! Link to comment Share on other sites More sharing options...
herewasplato Posted August 5, 2005 Share Posted August 5, 2005 ...I removed the WinWaitActive...debug popup said thats what was holding it up....<{POST_SNAPBACK}>Not exactly what I had in mind, but since you got it working, you must have fixed (not removed) the line that it was stopping on.later [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Guest nap Posted August 9, 2005 Share Posted August 9, 2005 y haven't u tried out the msi.install cause adobe for example is msi packed.run('msiexec.exe /I "S:\pcinstall\AR7DE\Adobe Reader 7.0 - Deutsch.msi" /qr')or visit http://www.appdeploy.com/packages/detail.asp?id=404 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