jsisson01 Posted March 18, 2008 Posted March 18, 2008 Hi all, I thought I had this finished, but the WinWaitClose command I had which was working originally is now not working, can anybody help me out? Func MSDEButton() Run("sql70ins.bat") WinWaitClose("%SystemRoot%\system32\cmd.exe", "%SystemRoot%\system32\cmd.exe") Sleep(3000) Run("sql70sp4.exe") WinWaitActive("Installation Folder") ControlClick("Installation Folder", "Finish", 12325) WinWaitActive("PackageForTheWeb") ControlClick("PackageForTheWeb", "&Yes", 6) WinWaitActive("PackageForTheWeb") ControlClick("PackageForTheWeb", "OK", 2) WinWaitClose("PackageForTheWeb") Run("C:\70SP4\setup.bat", "C:\70SP4\") EndFunc
rudi Posted March 18, 2008 Posted March 18, 2008 (edited) Hi, try this one: WinWaitClose(envget("systemroot") & "\system32\cmd.exe","") MsgBox(64,"Gone","CMD.EXE's window has vanished") regards, Rudi. Edited March 18, 2008 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE!
DW1 Posted March 18, 2008 Posted March 18, 2008 or use the macro: WinWaitClose( @WindowsDir & "\system32\cmd.exe") AutoIt3 Online Help
rudi Posted March 18, 2008 Posted March 18, 2008 or use the macro:Of course the macro is the easier way. I just wanted to point out that environment variables have to be resolved using envget() So finally the suggestion for reading up help files and FAQ (sticky postings topmost in this forum) has to be mentioned. :hint:Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
jsisson01 Posted March 18, 2008 Author Posted March 18, 2008 (edited) It still doesn't seem to be working correctly, the script still moves into the next install without waiting for the other window to close. Would it have anything to do with the installer being in silent install mode? I'm not sure, but I'm just venturing a guess. Edited March 18, 2008 by jsisson01
PsaltyDS Posted March 18, 2008 Posted March 18, 2008 It still doesn't seem to be working correctly, the script still moves into the next install without waiting for the other window to close. Would it have anything to do with the installer being in silent install mode? I'm not sure, but I'm just venturing a guess. How about using the process ID instead of the window title: Func MSDEButton() Local $PID = Run("sql70ins.bat") Sleep(1000) ProcessWaitClose($PID) Sleep(3000) ; ... EndFunc Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
jsisson01 Posted March 19, 2008 Author Posted March 19, 2008 How about using the process ID instead of the window title: Func MSDEButton() Local $PID = Run("sql70ins.bat") Sleep(1000) ProcessWaitClose($PID) Sleep(3000) ; ... EndFunc That one did it! Thanks! That should fix my other issues too
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