Jump to content
Sahar

Compile bunch of autoit scripts

Recommended Posts

Sahar

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?

Share this post


Link to post
Share on other sites
SadBunny

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.)

  • Like 1

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

Share this post


Link to post
Share on other sites
pranaynanda

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

Share this post


Link to post
Share on other sites
Sahar

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

Share this post


Link to post
Share on other sites
SadBunny

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.

Share this post


Link to post
Share on other sites
Sahar

woww...It's working, after putting Aut2exe.exe in script's folder the problem got solved :)

Share this post


Link to post
Share on other sites
SadBunny

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.

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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.