magace Posted June 6, 2014 Share Posted June 6, 2014 I am creating a simple program to connect to my vpn. However when sending threw cmd line it seems to send part of the code out of order. Func Connect() Run("cmd.exe") WinActivate("cmd.exe") sleep(1000) Send('"C:\Program Files (x86)\HMA! Pro VPN\bin\HMA! Pro VPN.exe" -connect') EndFunc This is what it types into the cmd line: Bold is the text the script sends C:UserstestdeeeezDesktopConnect>"C:Program Files (x86)HMAonnect I need it to send this: "C:Program Files (x86)HMA! Pro VPNbinHMA! Pro VPN.exe" -connect Any ideas why its messing up? Thanks! Link to comment Share on other sites More sharing options...
Developers Jos Posted June 6, 2014 Developers Share Posted June 6, 2014 try: Send('"C:\Program Files (x86)\HMA! Pro VPN\bin\HMA! Pro VPN.exe" -connect',1) But why use the CMD prompt at all instead of Run()? Jos 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. Link to comment Share on other sites More sharing options...
magace Posted June 6, 2014 Author Share Posted June 6, 2014 You can send a cmd line threw run? I want to connect using cmd not the actual program. Link to comment Share on other sites More sharing options...
Developers Jos Posted June 6, 2014 Developers Share Posted June 6, 2014 I want to connect using cmd not the actual program. ... and the difference is what? 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. Link to comment Share on other sites More sharing options...
magace Posted June 6, 2014 Author Share Posted June 6, 2014 ... and the difference is what? Everything I can use -changeip too thx ,1 fixed it. Link to comment Share on other sites More sharing options...
Developers Jos Posted June 6, 2014 Developers Share Posted June 6, 2014 Everything I can use -changeip too thx ,1 fixed it. That still doesn't explain what works on a CMD line that doesn't work with Run() or ShellExecute(). Be clear on what your commandline looks like and you might get a much simpler alternative from us. Jos 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. 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