# _compile

## Recommended Posts

this is a UDF used to compile AutoIt scripts

;===============================================================================
;
; Description:  _compile
; Parameter(s): $s_source = AutoIt script to compile ;$s_dest = Destination Exe File
;                       $i_decompile = [optional] wether or not the script can be decompiled. 0 for no, 1 for yes. default is 1 ;$s_pass = [optional] passphrase to use for decompilation. this has no effect if $i_decompile is 0. For no passphrase, set this to "nopass" ;$s_icon = [optional] icon to use for compiled script
;
; Return Value(s):  Success: returns 1
;                   Failure:
;                       returns 0 if script not compiled
;                       returns -1 if source isn't found, or if it isn't an autoit v3 script
;                       returns -2 if destination isn't an exe file
;                       returns -3 if $s_icon isn't an icon, or isn't found. ; returns -4 if Aut2Exe.exe can't be found ; Author(s): theguy0000 < theguy0000@codewiz.xemoc.net > ; ;=============================================================================== Attached is a manual entry in the same (almost...i tried the best i could) format as the docs included with AutoIt. If you don't understand, read that. Edited by theguy0000 The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN #### Share this post ##### Link to post ##### Share on other sites so i put a new line like this$i_decompile = 1

to not decompile?

Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go?

##### Share on other sites

no, you put it as a parameter.

see,

_compile ($s_source,$s_dest, $i_decompile=1,$s_pass="nopass", $s_icon="noicon") you would put it like this: _compile ( "C:\bar\foo\sourceFile.au3", "C:\bar\foo\DestFile.exe" [,0 [,"passphrase" [,"C:\foo\bar\icon.ico"]]]) the parameters inside brackets [] are option, but don't include the brackets in the code itself! 1 allows decompilation (default), and 0 doesnt. _compile ( "C:\bar\foo.au3", "C:\foo\bar.exe", 0 ) That would compile bar\foo.au3 to foo\bar.exe. foo\bar.exe would not be allowed to be decompiled. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN #### Share this post ##### Link to post ##### Share on other sites _compile ($s_source, $s_dest,$i_decompile=1, $s_pass="nopass",$s_icon="C:\Program Files\Diablo II\Diablo II Loader.exe")

I tried that to make it as a icon did i do something wrong? cause it didnt work and i can still decompile it

Edited by Snipz

Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go?

##### Share on other sites

You need to use a icon file with a .ico extension. Aut2Exe cannot extract icons out of executables. 0 is no decompile by my understanding.

##### Share on other sites

I figured out how to put icons in and the decompile doesnt work

Once my friend told me that he had found Jesus. I thought to myself, "Woohoo, we're rich!" It turns out he meant something different.Sometimes I just like to lay in my bed and look up at the stars and wonder..where the hell did my roof go?

##### Share on other sites

0 means decompilation is NOT allowed.

1 means decompilation IS allowed

If you don't put anything for decompilation, it will automatically be set to 1.

edit: added a manual entry in the first post.

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

##### Share on other sites

@theguy0000:

Thanks. This is just what I need to compile my first GUI. This may be a dumb question, since I do not know a lot about programing, but is it possible to include any other types of files with the compile (besides the icon file)? I would like to include some .exe files so that everything can be loaded as one file.

##### Share on other sites

Peter1234 -

No, thats not possible with autoit, not without running a 3rd party app completely seperate from AutoIt.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

##### Share on other sites

See help file entry for FileInstall

Good luck!

##### Share on other sites

is there a way you can compile a script with your script on another pc (no autoit)? what happens with the inclusions like #include<guiconstants.au3>?

is there a way you can include the files in a script(exe) to be included later on?

##### Share on other sites

You could FileInstall it.

##### Share on other sites

i'm gonna try that

maybe this works for me

thx anyway

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...