autNOC Posted September 23, 2005 Posted September 23, 2005 Hi All - Brand new poster and relatively new to AutoIt. I'm trying to write a script that (via an AdLibEnable call) tries to detect a certain dialog box that pops-up in an installer program. Basically I want to detect when a dialog box with "Installer" as the title and "You must restart Windows to complete the installation." pops up. But it seems, even with the AdLib function running, it won't see that message box as it's not a proper "child" window and it's modal. Any ideas? I can provide code thus far if that'll help . . . Many thanks!
is8591 Posted September 23, 2005 Posted September 23, 2005 Hi All -Brand new poster and relatively new to AutoIt.I'm trying to write a script that (via an AdLibEnable call) tries to detect a certain dialog box that pops-up in an installer program. Basically I want to detect when a dialog box with "Installer" as the title and "You must restart Windows to complete the installation." pops up.But it seems, even with the AdLib function running, it won't see that message box as it's not a proper "child" window and it's modal.Any ideas? I can provide code thus far if that'll help . . .Many thanks!WinExists("Installer", "You must restart Windows to complete the installation")
autNOC Posted September 23, 2005 Author Posted September 23, 2005 Wow - thanks for the quick replies, but I've already incorporated those things in my script. Here's what I have . . . ______________________ . . . Func InstallNonXP() ; Force Window sniffing to look at child windows as well Opt ("WinSearchChildren",1) ; Initiate setup, but don't use RunWait because we want AdLib to run until we have the reboot box Run ("setup.exe", @ScriptDir) ; Initiate the TestRebootWindow function to flag the dialog box AdLibEnable ("TestRebootWindow",250) Exit EndFunc . . . Func TestRebootWindow() ; Look for reboot window that runs at the end of 98, 2k and ME installers ; Title: "Installer"; Body: "Windows must be restarted to complete the installation." $rebootDialogActive = WinExists("Installer","Windows must be restarted to complete the installation.") If $rebootDialogActive = 1 Then LockAndLoad() EndIf EndFunc _______________________________________________ I've verified (with the Window Info app) that the window title is "Installer" and the text is exactly as I have it in my script. I've even tried some one-offs that don't work either. Do you see anything wrong with the above?
seandisanti Posted September 23, 2005 Posted September 23, 2005 Maybe try adding Opt("WinTitleMatchMode",4)[code=auto:0]and then you could use the classname to match instead of the title...
is8591 Posted September 23, 2005 Posted September 23, 2005 Are you sure AU is not seeing the pop-up or can not restart windows. Does the pop-up has a button to restart?
autNOC Posted September 23, 2005 Author Posted September 23, 2005 Are you sure AU is not seeing the pop-up or can not restart windows.Does the pop-up has a button to restart?It seems to me as if the script can't see the dialog box - I thought maybe because it was modal, but I'm not so sure now.The dialog has only an Okay button, so it does wait for the user before it restarts, but there aren't "No" or "Restart Later" type options.
autNOC Posted September 23, 2005 Author Posted September 23, 2005 Func InstallNonXP()Opt ("WinSearchChildren",1)Run ("setup.exe", @ScriptDir)AdLibEnable ("TestRebootWindow",250)ExitEndFuncI see the "Exit" as being a problem... Your script will exit and perform no actions thereafter... because... well... it exited.Lar.I noticed that just before you replied actually But I took it out and it's still not working.
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