Jorex Posted September 5, 2006 Share Posted September 5, 2006 Hello friends, I, would like to clear some doubts: As I do to close AutoIt after the installation. Mine doesn't want to close.Thanks for all Link to comment Share on other sites More sharing options...
MHz Posted September 6, 2006 Share Posted September 6, 2006 If you would like some help, then providing some information could give us an idea as to your problem. Script, Installer, Software deployment method...or any suitable information.Thanks Link to comment Share on other sites More sharing options...
PaulIA Posted September 6, 2006 Share Posted September 6, 2006 Sounds like your script is still waiting for something. Maybe your in a loop somewhere waiting for something to happen or your using one of the WinWaitxxx functions. Without seeing your script, it's going to be hard to help you Link to comment Share on other sites More sharing options...
Jorex Posted September 6, 2006 Author Share Posted September 6, 2006 Hello friends, this below is the script that doesn't close after the installation concluding.*****************************Run("Nitro_PDF_Pro.exe /s")Sleep(1000);--- AutoIt Macro Generator V 0.21 beta ---Opt("WinTitleMatchMode", 4)WinWait("NitroPDF","")$CLVItem = ControlListView("NitroPDF","","SysListView321","FindItem","Nitro_PDF_Pro.exe")ControlListView("NitroPDF","","SysListView321","SelectClear")ControlListView("NitroPDF","","SysListView321","Select",$CLVItem)WinWait("Nitro PDF Professional - InstallShield Wizard","The InstallShield® Wizard wi")ControlClick("Nitro PDF Professional - InstallShield Wizard","The InstallShield® Wizard wi","Button1")Sleep(1000)WinWait("Nitro PDF Professional - InstallShield Wizard","&Organization:")ControlClick("Nitro PDF Professional - InstallShield Wizard","&Organization:","Button5")Sleep(1000)Sleep(1000)Sleep(1000)WinWait("Nitro PDF Professional - InstallShield Wizard","I &accept the terms in the lic")Sleep(1000)ControlClick("Nitro PDF Professional - InstallShield Wizard","I &accept the terms in the lic","Button3")Sleep(1000)Sleep(1000)ControlClick("Nitro PDF Professional - InstallShield Wizard","I &accept the terms in the lic","Button5")Sleep(1000)Sleep(1000)Sleep(1000)Sleep(1000)Sleep(1000)WinWait("Nitro PDF Professional - InstallShield Wizard","&Complete")ControlClick("Nitro PDF Professional - InstallShield Wizard","&Complete","Button5")Sleep(1000)Sleep(1000)Sleep(1000)Sleep(1000)Sleep(1000)WinWait("Nitro PDF Professional - InstallShield Wizard","Add Nitro PDF to the Desktop.")ControlCommand("Nitro PDF Professional - InstallShield Wizard","Add Nitro PDF to the Desktop.","Button4","UnCheck","")Sleep(1000)Sleep(1000)Sleep(1000)ControlClick("Nitro PDF Professional - InstallShield Wizard","Add Nitro PDF to the Desktop.","Button1")Sleep(1000)Sleep(1000)Sleep(1000)Sleep(1000)WinWait("Nitro PDF Professional - InstallShield Wizard","NewBinary1")Sleep(1000)Sleep(1000)ControlClick("Nitro PDF Professional - InstallShield Wizard","NewBinary1","Button2")Sleep(1000)Sleep(1000)WinWait("Nitro PDF Professional - InstallShield Wizard","The InstallShield Wizard has s")Sleep(1000)Sleep(1000)Sleep(1000)ControlClick("Nitro PDF Professional - InstallShield Wizard","The InstallShield Wizard has s","Button1")Sleep(1000)Sleep(1000)WinWait("Nitro PDF","Try Out")Sleep(1000)Sleep(1000)Sleep(1000)ControlClick("Nitro PDF","Try Out","Afx:10000000:81")Sleep(1000)Sleep(1000)Sleep(1000)Sleep(1000)Sleep(1000)WinWait("Thank you for installing Nitro PDF Professional - Microsoft Internet Explorer","Links");--- End ---************************************************************************** Link to comment Share on other sites More sharing options...
Siginet Posted September 6, 2006 Share Posted September 6, 2006 If you highlight the icon it should tell you what command it is stuck on. Link to comment Share on other sites More sharing options...
PaulIA Posted September 6, 2006 Share Posted September 6, 2006 A few of suggestions:1) Use the Opt keyword to turn on debugging. Then you can put the cursor over the icon in the system tray and it will tell you what line the script is executing.2) WinWait just waits for the window to appear. Use WinWaitActive to wait for the window to appear and become the active window. You can probably eliminate all of your sleep statements if you do this. If you need to make a window active after it appears (say some other window has grabbed the focus just after the window pops up), you can do this:WinWait("Nitro PDF Professional - InstallShield Wizard","The InstallShield® Wizard wi")WinActivate("Nitro PDF Professional - InstallShield Wizard","The InstallShield® Wizard wi")This will wait for the window to become visible and then make it the active window. My bet is this is where your problem is.3) Get rid of all those Sleep statements. Every machine runs differently and the time for a window to appear on one machine is different on another machine. Use the technique above.4) You need to put some error checking after:$CLVItem = ControlListView("NitroPDF","","SysListView321","FindItem","Nitro_PDF_Pro.exe")You're not checking $CLVItem or @error to see if the function succeeded before using $CLVItem in further statements.Hope this helps Link to comment Share on other sites More sharing options...
Jorex Posted September 6, 2006 Author Share Posted September 6, 2006 Which the command I place in the end of Scriprt to close the icon of AutoIt that this opened close to the clock?Thank you very much! Link to comment Share on other sites More sharing options...
PaulIA Posted September 6, 2006 Share Posted September 6, 2006 (edited) Start with this:Opt("TrayIconDebug", 1)Run("Nitro_PDF_Pro.exe /s")WinWaitActive("NitroPDF", "")$CLVItem = ControlListView("NitroPDF", "", "SysListView321", "FindItem", "Nitro_PDF_Pro.exe")if @error = 1 then MsgBox(16, "Error", "$CLVItem failed");endifControlListView("NitroPDF", "", "SysListView321", "SelectClear")ControlListView("NitroPDF", "", "SysListView321", "Select" , $CLVItem)WinWaitActive("Nitro PDF Professional - InstallShield Wizard", "The InstallShield® Wizard wi")ControlClick ("Nitro PDF Professional - InstallShield Wizard", "The InstallShield® Wizard wi", "Button1")WinWaitActive("Nitro PDF Professional - InstallShield Wizard", "&Organization:")ControlClick ("Nitro PDF Professional - InstallShield Wizard", "&Organization:", "Button5")WinWaitActive("Nitro PDF Professional - InstallShield Wizard", "I &accept the terms in the lic")ControlClick ("Nitro PDF Professional - InstallShield Wizard", "I &accept the terms in the lic", "Button3")ControlClick ("Nitro PDF Professional - InstallShield Wizard", "I &accept the terms in the lic", "Button5")WinWaitActive("Nitro PDF Professional - InstallShield Wizard", "&Complete")ControlClick ("Nitro PDF Professional - InstallShield Wizard", "&Complete", "Button5")WinWaitActive ("Nitro PDF Professional - InstallShield Wizard", "Add Nitro PDF to the Desktop.")ControlCommand("Nitro PDF Professional - InstallShield Wizard", "Add Nitro PDF to the Desktop.", "Button4", "UnCheck", "")ControlClick ("Nitro PDF Professional - InstallShield Wizard", "Add Nitro PDF to the Desktop.", "Button1")WinWaitActive("Nitro PDF Professional - InstallShield Wizard", "NewBinary1")ControlClick ("Nitro PDF Professional - InstallShield Wizard", "NewBinary1", "Button2")WinWaitActive("Nitro PDF Professional - InstallShield Wizard", "The InstallShield Wizard has s")ControlClick ("Nitro PDF Professional - InstallShield Wizard", "The InstallShield Wizard has s", "Button1")WinWaitActive("Nitro PDF", "Try Out")ControlClick ("Nitro PDF" ,"Try Out", "Afx:10000000:81")ExitI haven't run this because I don't have access to Nitro PDF, but it should be close.Now, if the script doesn't finish (the AutoIt icon is still in your system tray), hover your cursor over the AutoIt icon (the one in your system tray) and it will popup a box telling you what line on the above script it is on. From there, you can modify the script to correct the problem. Edited September 6, 2006 by PaulIA Link to comment Share on other sites More sharing options...
Jorex Posted September 6, 2006 Author Share Posted September 6, 2006 Thank you very much friend. Link to comment Share on other sites More sharing options...
PaulIA Posted September 7, 2006 Share Posted September 7, 2006 You are welcome. Hope you found the problem with your script. 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