Jump to content
Skrixx

Attach a specific command console program

Recommended Posts

Skrixx

Hi i'm new to autoit. But i want to known how to attach a specific command console file, for example i want to open 123.exe and i want to work it like .bat(bat sample: 123.exe <output file> <input file>) is this possible? Thank you very much in advance;)

Share this post


Link to post
Share on other sites
Skrixx

Note: i want to create a simple form for easy and portable task

Share this post


Link to post
Share on other sites
OldGuyWalking

@Skrixx

Are you asking if you can create an application in AutoIt that will accept command line parameters and run it in a batch file?

If so, then the answer is yes.

C:\123.exe "C:\Test\Myoutput.txt" "C:\Test\MyInput.txt"

Search for Command Line Parameters in AutoIT Help.  

There's a section on $CmdLine.   $CmdLine is an array that AutoIT creates when you start your application.  Parameters will be stored in the Array.

Using the example above, the values stored in the $CmdLine array would be -

$CmdLine[0] = 2  ; Number of parameters.
 $CmdLine[1] = "C:\Test\Myoutput.txt"  ; First parameter
 $CmdLine[2] = "C:\Test\MyInput.txt"    ; Second parameter

Good Luck.

 

 

 

 

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

×