Jump to content

Recommended Posts

Posted

I need a script or batch file to compile bunch of *.au3 in a folder and recieve *.exe in that folder, would you please help me about that?

Posted

In your directory with autoit scripts, use the following commandline (modify path and anything else you want to change of course):

for /f %f in ('dir /b *.au3') do f:\dev\AutoIt3\Aut2Exe\Aut2exe.exe /in %f

Something like that? (Double the % signs if you run that from a batch file.)

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Posted (edited)

Create an array of files in the folder and then pass them through Aut2Exe as parameters this way:

Run("Aut2Exe.exe /in <filename.au3>")

This will create executable of all files in that folder.

Edited by pranaynanda
Posted (edited)

I've tried these 2 in batch files :

    setlocal enableextensions disabledelayedexpansion 

    for %%a in ("C:\Test\*.au3") do (
    C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe /in "%%~fa" /out "%%~dpna.exe" 
    )

AND

for /f %%f in ('C:\Test\*.au3') do C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe /in %%f

non of them worked :(

I'm not good at batch files so I cannot find the reason of failure, I would be thankful if you help me...

Also how can I do it via command line?

Edited by Sahar
Posted

First, try quoting that path that contains spaces. (I tend to avoid spaces in my path so I don't have to worry much about quotes :) )

Second, what I gave you was (or should be) runnable from the command line. I tested it and it works fine for me :)  Just use single percent signs from commandline and double percent signs if you put that command in a batchfile.

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Posted

Well ok, but it shouldn't be necessary to do that. Oh well, if that's good enough then fine :) 

Roses are FF0000, violets are 0000FF... All my base are belong to you.

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
  • Recently Browsing   0 members

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