Sign in to follow this  
Followers 0
readify

Windows 7 Control Click

5 posts in this topic

Hello All,

New to AutoIT. I'm working on my first script to create a vpn connection automatically..My code so far is below.

run("control.exe /name Microsoft.NetworkAndSharingCenter")

Opt("WinTitleMatchMode", 4)

WinWait("Network and Sharing Center","")

ControlClick("Network and Sharing Center","","DirectUIHWND4")

I run this script and it loads the run command fine, which brings up the network and sharing center, but the control click doesnt seem to do anything.. Am I missing something here or is it because I'm using Windows 7?

Share this post


Link to post
Share on other sites



My OS is Vista, so that may be why the window is instance 2, not 4 as in your code, but I would think you would have to explicitly tell the ControlClick where to click in that window.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

uihwind4 is like one big control if you are going to use this on just your system ands you wont be changing settings try using coords 119,290

ControlClick("", "", "", "", "","119,290")

syntax may be wrong but compare that to the help and play with it. IDK hope it helps

Share this post


Link to post
Share on other sites

I see your point. So if I want it to use it on another machine this is not possible?

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