Sign in to follow this  
Followers 0
sosimple

How to translate this Dos comand to autoit?

7 posts in this topic

Hi I have this in a .bat file

start /wait rasphone -h "AccessRunner DSL"

whitch when i run it , it disconnect the usb adsl modem .

Whow can I do it to run with automate? I have search the forum for hours , but i havent made it.

Please help, Thank

Share this post


Link to post
Share on other sites



Whow can I do it to run with automate?

Assume you mean AutoIt3 ?

Hi I have this in a .bat file

start /wait rasphone -h "AccessRunner DSL"

whitch when i run it , it disconnect the usb adsl modem .

Whow can I do it to run with automate? I have search the forum for hours , but i havent made it.

Please help, Thank

RunWait(@Comspec & ' /c start /wait rasphone -h "AccessRunner DSL"')

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Hi I have this in a .bat file

start /wait rasphone -h "AccessRunner DSL"

whitch when i run it , it disconnect the usb adsl modem .

Whow can I do it to run with automate? I have search the forum for hours , but i havent made it.

Please help, Thank

look at RunWait()

I believe that there is also a _RunDOS() UDF that attempts to hide some of the complexities from you.

or you can use Run() and call the .bat file directly. (recommend switching to .cmd extension if you are using w2k or above)

You will not need the start / wait portion of the line when called via au3.

You are probably getting tripped up on one of three issues:

the afore-mentioned fact that you won't need start /wait, unless you call the batch file directly

you will need to handle the @comspec /c syntax

spaces and quotes make for some potentially complex command lines.

use consolewrite() or msgbox() to display what you're trying to send to the shell to debug.


Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

Assume you mean AutoIt3 ?

RunWait(@Comspec & ' /c start /wait rasphone -h "AccessRunner DSL"')
Thanks !!! It works very well

Share this post


Link to post
Share on other sites

If there is a solution not to open the dos windows to do the same it would me tha best. If anyone knows this.

Thanks again

Share this post


Link to post
Share on other sites

RunWait(@ComSpec & ' /c start /wait rasphone -h "AccessRunner DSL"', "", @SW_HIDE)


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

RunWait(@ComSpec & ' /c start /wait rasphone -h "AccessRunner DSL"', "", @SW_HIDE)
Thank, I think this will do , I will try it, thanks again all.

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