tarretarretarre

Au3-CLI (Run Au3 files from CMD anywhere)

3 posts in this topic

#1 ·  Posted (edited)

Hi again!

 

ZLSueai.png

 

Was is das?

Das is a program to run .au3 files from anywhere. Just like php can run php files anywhere. (If you have them installed via XAMPP or similar packages)

Why?

For convenience sake, this allows you expand the possibilites when creating Autoit-Art just like php allows composer to autoload your dependencies.

What happends when if I run the file?

  1. The script compiles itself to %appdata%\au3\au3.exe
  2. Adds %appdata%\au3 to the windows PATH envoirment variable
  3. Refreshes Windows envoirment variables (Its like logging in and out)

How to install

  1. Download and run au3.au3 from anywhere.
  2. Restart any open CMD instance (That includes built-in ones like Scite and other IDE’s)
  3. Done

FAQ

Q: How do i run files with spaces?
A: Encapsulate the name with double qoutes "". Example: au3 "my file"

Q: How do i pass parameters?
A: Every parameter after the <File> input are parsed as parameters, grab them in the script using $CmdLine. Example: au3 myfile param1 param2 param3
See more on how Autoit handles parameters Here

Scripts (For “Advanced users”)

Scripts can be used to make aliases for any command(s) you wish to run often

Scripts are looked for in au3.ini under the section [scripts]. Each key represents the <Script name> and each value represents the command(s) to be ran. You can run multiple commands by separating them with the pipe-char |

Example

au3.ini

[scripts]
my-script=ping google.se|au3 run my-script
my-second-script=ping yahoo.co.uk

When running au3 run my-script the script will first ping google.se and then start a second script my-second-script which will run ping yahoo.co.uk.

 

 

au3.au3

Edited by tarretarretarre
Update script

Share this post


Link to post
Share on other sites



#2 ·  Posted

Good idea, I'll test it.

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