dsvpcsupport Posted March 14, 2008 Posted March 14, 2008 Sorry newbie to this and despite hours of fiddling & staring at the code cannot get this to work. It's just for Autoroute install, and if NET 1.1 is not installed it comes up with an extra window at the start of install. Idea was test if Net exists, click on OK on this window to install Net 1.1, and then continue on with rest of install. Works perfectly without the IF THEN, so must be this that is not working, but I cannot see where. It just stops on the Window and does not process the Controlclick to continue. Here's the text, any ideas very gratefully recieved : If Winexists ("Microsoft AutoRoute 2007 Setup","requires additional system components") Then WinWaitActive ("Microsoft AutoRoute 2007 Setup","requires additional system components") WinActivate("Microsoft AutoRoute 2007 Setup","requires additional system components") ControlClick("Microsoft AutoRoute 2007 Setup","requires additional system components", 1, "OK") EndIf WinWaitActive ("Microsoft AutoRoute 2007 Setup", "Welcome!") send("!n") WinWaitActive ("Microsoft AutoRoute 2007 Setup", "Please enter your information.") send("!n")
MHz Posted March 14, 2008 Posted March 14, 2008 (edited) Seems like a good time to use AdlibEnable() to check for a window that may or may not appear. I did a little change to your example so hope it works ok for you.AdlibEnable('_Adlib'); enable constant check for possible window WinWait("Microsoft AutoRoute 2007 Setup", "Welcome!") ControlClick("Microsoft AutoRoute 2007 Setup", "Welcome!", "&Next") AdlibDisable(); disable constant check for possible window WinWait("Microsoft AutoRoute 2007 Setup", "Please enter your information.") ControlClick("Microsoft AutoRoute 2007 Setup", "Please enter your information.", "&Next") Func _Adlib() If Winexists ("Microsoft AutoRoute 2007 Setup","requires additional system components") Then ControlClick("Microsoft AutoRoute 2007 Setup","requires additional system components", "OK") EndIf EndFuncEdit:Updated ControlID parameters Edited March 14, 2008 by MHz
dsvpcsupport Posted March 14, 2008 Author Posted March 14, 2008 It works Thank you so much for your help - very very grateful.
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