Jump to content
Sign in to follow this  
zampoot

Error compiling au3 file using aut2exe

Recommended Posts

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 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

 

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I think he said that the problem was the space in the path name :)

..and your point is ...what?  ;)

Jos

Share this post


Link to post
Share on other sites

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 ?! 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

So still not solved right ?! 

It will be when you follow the advise given in my previous post and repeated by SmOke_N. ;)

Jos

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
Sign in to follow this  

×
×
  • Create New...