Jump to content
Sign in to follow this  
magace

Send() is not sending full line of code.

Recommended Posts

magace

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!

Share this post


Link to post
Share on other sites
magace

You can send a cmd line threw run?

I want to connect using cmd not the actual program.

Share this post


Link to post
Share on other sites
magace

... and the difference is what?

Everything I can use -changeip too :D thx ,1 fixed it.

Share this post


Link to post
Share on other sites
Jos

Everything I can use -changeip too :D 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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×