Jump to content

Compiler Command line


Recommended Posts

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

Link to comment
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...
Link to comment
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)
Link to comment
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.

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

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

Edited by Bert
Link to comment
Share on other sites

Link to comment
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?

Link to comment
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...

Link to comment
Share on other sites

Read carefully next time :)

$infile = "temp.au3"
$outfile = ""&$ReadInput1&".exe"
$param = '/in "'&$infile&'" /out "'&$outfile &'"'
ShellExecute(@ScriptDir&"\Aut2exe.exe", $Param)
Link to comment
Share on other sites

Link to comment
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

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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