Sign in to follow this  
Followers 0
Tarte

VPN

6 posts in this topic

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?

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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()...


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0