Tarte Posted December 10, 2004 Posted December 10, 2004 I get a message box from the OS that has an OK button. Autoit spy shows the following: >>>>>>>>>>>>( Window Title )<<<<<<<<<<<<< Network Connections ( classname=#32770 ) >>>>>>>>>>>( Mouse Position )<<<<<<<<<<<< On Desktop: x: 507 y: 162 In Window: x: 404 y: -149 >>>>>>>>>>>>>( Pixel Color Under Mouse)<<<<<<<<<<<<< Dec: 13554646 Hex: 0xCED3D6 >>>>>>>>>>>( Window Position )<<<<<<<<<<< left: 103 top: 311 width: 477 height: 119 >>>>>>>>( Last Control Under Mouse )<<<<<<< >>>>>>>>>( Status Bar Text )<<<<<<<< >>>>>>>>>>>( Visible Window Text )<<<<<<<<< OK An entry named Wireless VPN Connection already exists. Choose a different name. >>>>>>>>>>( Hidden Window Text )<<<<<<<<< I want the script to end if the Visible Window text matches. But how do I handle the OK button?
Josbe Posted December 10, 2004 Posted December 10, 2004 Look "IsVisible" option.Helpfile - ControlCommand AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
Tarte Posted December 10, 2004 Author Posted December 10, 2004 Look "IsVisible" option.Helpfile - ControlCommand<{POST_SNAPBACK}>So how does the command go to use the isvisible, click ok to cancel that window, then cancel on the whole setup of a new vpn connection
Developers Jos Posted December 10, 2004 Developers Posted December 10, 2004 So how does the command go to use the isvisible, click ok to cancel that window, then cancel on the whole setup of a new vpn connection<{POST_SNAPBACK}>what does Au3_Spy tell you when you hover over the OK button ?If it gives a control name you probably can use ControlClick()... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Josbe Posted December 10, 2004 Posted December 10, 2004 (edited) ohhh...sry. ControlClick("Network Connections", "", "Button1") Edited December 10, 2004 by josbe AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
Tarte Posted December 10, 2004 Author Posted December 10, 2004 I should have put my script here to begin with to be more clear: Send("#r") ClipPut("rasphone") Send("^v") WinWaitActive ( "Run", "" , 100 ) Send("{enter}") WinWaitActive ( "Network Connections", "" , 100 ) Send("!N") WinWaitActive ( "New Connection Wizard", "" , 100 ) Send("!t") Send("!N") ;Sleep(300) Send("!D") Send("!N") ;Sleep(300) ClipPut("100.100.100.100") Send("^v") Send("!N") ;Sleep(300) ClipPut("Wireless VPN Connection") Send("^v") Send("{enter}") ControlClick("Network Connections", "", "", "center") ;Send("{Esc}") ;MsgBox ( 0, "Wireless VPN Installation", "This install was successful" , 2 ) Problem is if you already have the script it will fail.
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