Jump to content

Error compiling au3 file using aut2exe


Go to solution Solved by SmOke_N,

Recommended Posts

Posted

Hello

I made some script in vbscript to automate the compilation for each au3 file located in some folder, the compilation goes fine when the au3 file name is written in English and does not contain any spaces. but I got some au3 file names which is non-english. Additionally when I tried to compile au3 file which it name contain space or non english using this command in cmd :

aut2exe /in "nfsdk demo.zip" /out zipped.exe

I used double quotes but that doesn't work

So how to compile any au3 file using aut2exe from command line whatever the au3 file name is(non english,contain spaces .....)

thanks in advance 

Posted

I'm not familiar with command line compiling, But I'd first check that it works without spaces in the path or filename.

Tested and working without spaces

  • Developers
Posted

 

Try wrapped in single quote...

'"nfsdk demo.zip.au3"'

Doubt that works in VBS as a single qoute means the rest of the line is treated as comment. :)

@Zampoot, show us the exact line you coded  in VBS.

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

  • Developers
Posted

Something like this should work fine:

Set objShell = CreateObject("Wscript.Shell")
objShell.Run("""C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe"" /in ""t2 with space.au3"" /out ""t25 with space.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.
  :)

Posted

Thanks JohnOne and Jos

I have tried your suggestion,still not work for me

here is some of my code :

TargetPath = "some directory"
FileName = "any file name with spaces"
IconName = "some icon absolute path"
Comm = "cmd /c "  & TargetPath & "\" & "Aut2Exe.exe /in " & TargetPath & "\" & FileName & ".au3" & " /out " & TargetPath & "\" & FileName & ".exe" & " /icon " & IconName
Set objShell = CreateObject("Wscript.Shell")
objShell.Run(Comm)

I put Aut2Exe.exe in the same directory where the au3 files are located.... 
any way I made some stupid solution in my vbscript file by renaming any file contains spaces to another name, I just replaced the space by underscore then compile the file and after that get it back to it's original name (I told you it's stupid :D)

So still not solved right ?! 

  • Moderators
  • Solution
Posted

Here's the skinny.  Your files that have spaces... need to be "double" quoted.  That's all Jos was trying to demonstrate.  Your "TargetPath and "FileName" and "IconName" do not have double quotes.

TargetPath = """some directory"""
FileName = """any file name with spaces"""
IconName = """some icon absolute path"""

If not double quoted, then the spaces act as markers for the command line (different switches).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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