readify Posted October 26, 2009 Share Posted October 26, 2009 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? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted October 26, 2009 Share Posted October 26, 2009 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. Link to comment Share on other sites More sharing options...
xandout Posted October 26, 2009 Share Posted October 26, 2009 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 Link to comment Share on other sites More sharing options...
readify Posted October 26, 2009 Author Share Posted October 26, 2009 I see your point. So if I want it to use it on another machine this is not possible? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted October 26, 2009 Share Posted October 26, 2009 It may be possible. Set to 0 or 2, probably 2.MouseCoordMode (Option) - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
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