Jump to content

Run a script from the command line


Recommended Posts

  • Developers

how would I write a bat file to tell autoit to execute a script?

Compile the script to EXE and execute that or else just run Autoit3.exe with as parameter your script:

"C:\Program Files\AutoIt3\autoit3.exe" "C:\path-to-scriptfile\script.au3"

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

how would I write a bat file to tell autoit to execute a script?

If you read help file you should find :

AutoIt specific command Line Switches

Form1: AutoIt3.exe [/ErrorStdOut] [/AutoIt3ExecuteScript] file [params ...]

Execute an AutoIt3 Script File

So your bat should be like this Posted Image

Start "%ProgramFiles%\AutoIt3\AutoIt3.exe /AutoIt3ExecuteScript" "C:\AutoIt Script.au3"

Edit : Works without /AutoIt3ExecuteScript arg, too

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...