Wolfshare Posted March 11, 2013 Author Share Posted March 11, 2013 Okay, the code isOpt("WinTitleMatchMode", 2) #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <FF.au3> global $clr global $file global $times global $clr2 global $x Local $x ; $i = 0 $x = 0 $r = 0 $t = 0 While $i <= 10 Do if not ProcessExists("HMA! Pro VPN.exe") Then run("C:\Program Files\HMA! Pro VPN\bin\HMA! Pro VPN.exe") endif Until $x = 1 WEndwhen it start it open the software then i'll mouseclick command to click connect buttom, but after sucess connection there isnt any way to detect when it connected, i mean titles not changing after sucessfully connection, so i want to make it detect by text, because when Hma sucess connected there is text on it: Succesfully connected to VPN Link to comment Share on other sites More sharing options...
JohnOne Posted March 11, 2013 Share Posted March 11, 2013 Connect to your VPN run this code from scite and post results here. Opt("WinTitleMatchMode", 2) Opt("WinDetectHiddenText",1) $_WinList = WinList("[CLASS:HMA! Pro VPN 2.7.1.7]") If Not IsArray($_WinList) Then Exit MsgBox(0,0,0) For $i = 1 To $_WinList[0][0] ConsoleWrite(WinGetText($_WinList[$i][1]) & @CRLF & @CRLF) Next AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Wolfshare Posted March 11, 2013 Author Share Posted March 11, 2013 Nothing happens..>"C:Program FilesAutoIt3SciTE..autoit3.exe" /ErrorStdOut "C:Documents and SettingsAdministratorDesktopNew AutoIt v3 Script.au3">Exit code: 0 Time: 0.311 Link to comment Share on other sites More sharing options...
Wolfshare Posted March 11, 2013 Author Share Posted March 11, 2013 Plase help me handle this thing.. Link to comment Share on other sites More sharing options...
JohnOne Posted March 11, 2013 Share Posted March 11, 2013 What other variations did you try with that code? or are you not interested in helping yourself. http://www.autoitscript.com/wiki/FAQ#When_should_I_bump_my_threads.3F AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Wolfshare Posted March 11, 2013 Author Share Posted March 11, 2013 No, i am trying to understand how to make it.. If i would not try, so why i should create a thread? Link to comment Share on other sites More sharing options...
JohnOne Posted March 11, 2013 Share Posted March 11, 2013 (edited) I'm asking if you tried anything else besides "[CLASS:HMA! Pro VPN 2.7.1.7]" In $_WinList = WinList("[CLASS:HMA! Pro VPN 2.7.1.7]") Within the above code? Edited March 11, 2013 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Wolfshare Posted March 11, 2013 Author Share Posted March 11, 2013 Nope, i havent. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 11, 2013 Moderators Share Posted March 11, 2013 Then we suggest you do so. We try to stick to the "teach a man to fish" model, rather than spoon-feeding you code. Why not try something on your own, and then come back if and when you run into a roadblock? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
RichardL Posted March 12, 2013 Share Posted March 12, 2013 I have automated the starting of a VPN, and decided that the way to see connection state is to look at the tooltip on the tray icon. Here is example code that looks at all the tray tooltips. (Assuming that your VPN also shows connection state in tooltip.) 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