Sign in to follow this  
Followers 0
JustinReno

Compiler Command line

18 posts in this topic

I'm creating a program requiring the use of the AutoIt Compiler.

I'm trying to use it through _RunDos

Like This:

_RunDos("Aut2exe.exe /in <temp.au3> /out <blah.exe>")

Aut2exe.exe and its files are in the script directory so this should work, but It doesn't. I've tried a lot of variations with it but it didn't work. Can someone help me, please?:)

Share this post


Link to post
Share on other sites



I'm creating a program requiring the use of the AutoIt Compiler.

I'm trying to use it through _RunDos

Like This:

_RunDos("Aut2exe.exe /in <temp.au3> /out <blah.exe>")

Aut2exe.exe and its files are in the script directory so this should work, but It doesn't. I've tried a lot of variations with it but it didn't work. Can someone help me, please? :)

Just use run...

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You can't use run, its a command line option, and besides, it gives me an error. But It runs with _RunDos

Edited by JustinReno

Share this post


Link to post
Share on other sites

Why can't you use run?

Run("Some.exe -param1 -param2", workingDir) ...

params are part of the exe

Share this post


Link to post
Share on other sites

It doesn't work.

Share this post


Link to post
Share on other sites

You can't use run, its a command line option, and besides, it gives me an error. But It runs with _RunDos

$filepath = RegRead ("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") & "\Aut2Exe\Aut2Exe.exe"
$infile = FileOpenDialog ("Open", "", "AutoIt V3 Scripts (*.au3)")
$outfile = FileSaveDialog ("Save As...", "", "Windows Exectuables (*.exe)")
MsgBox (0, "", "INFILE: "&$infile&@CRLF&"OUTFILE: "&$outfile)
$param = '/in "'&$infile&'" /out "'&$outfile &'"'
ShellExecute ($filepath, $param)

Share this post


Link to post
Share on other sites

Your code does work, but how would I use it without having any open/save dialog boxes and without having to use the registry. I'm fileinstalling the compiler.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Your code does work, but how would I use it without having any open/save dialog boxes and without having to use the registry. I'm fileinstalling the compiler.

Hard code the paths... output path is optional.

EDIT: And come on... I thought you would know what to do there...

Edited by Bert

Share this post


Link to post
Share on other sites

It didn't work when I tried, it gave me an error that it couldn't find aut2exe.exe

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Posted Image

EDIT: Is the image loading?

Edited by JustinReno

Share this post


Link to post
Share on other sites

Ok... Q) Have you ever heard of .jpg... loads 100x faster :)

Q2) Look very carefully at your shell execute line... Could you please post you offending code? The image has stopped working for me?

Share this post


Link to post
Share on other sites

It stopped working for me, and it is a jpg.

$infile = "temp.au3"
$outfile = ""&$ReadInput1&".exe"
$param = '/in "'&$infile&'" /out "'&$outfile &'"'
ShellExecute(@ScriptDir&"\Aut2exe.exe "&$Param&"")

Error: WINDOWS can not find C:\Documents and settings\jar\desktop\aut2exe.exe /in "temp.au3" /out "Web browser.exe". Make sure you typed the name correctly...

Share this post


Link to post
Share on other sites

Read carefully next time :)

$infile = "temp.au3"
$outfile = ""&$ReadInput1&".exe"
$param = '/in "'&$infile&'" /out "'&$outfile &'"'
ShellExecute(@ScriptDir&"\Aut2exe.exe", $Param)

Share this post


Link to post
Share on other sites

Ok... Q) Have you ever heard of .jpg... loads 100x faster :)

It's a .jpg, just an unnecessarily huge one. (almost 4MB)

I guess the better question is, ever heard of image cropping, or increasing compression on .jpg's?

Share this post


Link to post
Share on other sites

Yes

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

You can't use run, its a command line option, and besides, it gives me an error. But It runs with _RunDos

Your problem is probably going to be spaces in the path because you didn't enclose it in Double quotes.

$iFile = '"My script.au3"'
Run (@ScriptDir & '\aut2exe.exe /in ' & $iFile)

Also make sure the autoitSC.bin file is in the same folder as aut2exe.exe.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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  
Followers 0