Help With Compiling Autoit Script to .exe

Forum for anything else which doesn't fit in the above forums. Site feedback, random talk, whatever, are welcome.
Post Reply
User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Help With Compiling Autoit Script to .exe

Post by jamesbebby » Mon May 25, 2009 9:59 am

hi, im havin problems compiling a autoit script to the exe it was make for, i make the script with autoits own scriptwriter, test the au3 with the exe on my desktop and it installs fine but when i compile it with the exe using autoits very own Compile Script to .exe the file it makes is only about 300kb? when i double click on it my computer starts goin mad opening over 200 au3 near my clock
here the au3 http://rapidshare.com/files/237059300/easy.au3 is there something worry with it?
cheers james

User avatar
5eraph
Site Admin
Posts: 4621
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Mon May 25, 2009 10:58 am

Try removing the absolute path from your Run command.

Code: Select all

Run('C:\Documents and Settings\James\Desktop\easy.exe')
...should be:

Code: Select all

Run('easy.exe')
Just be certain that the compiled AutoIt script is in the SvcPack folder with Easy.exe.

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Mon May 25, 2009 11:17 am

5eraph wrote:Just be certain that the compiled AutoIt script is in the SvcPack folder with Easy.exe.
no im tryin to make so i can run it anywhere

User avatar
crashfly
Posts: 789
Joined: Thu Mar 13, 2008 11:39 pm
Location: Arkansas, USA

Post by crashfly » Mon May 25, 2009 1:22 pm

I think the point 5eraph is trying to make is that you are "compiling" this script, correct? If so, removal of the absolute file name means it will not look for that script where it should not look for it. By putting the file in with the script, it will *make* it work anywhere.
A mind is like a parachute, it only functions when it is open.
--Anonymous

How to Ask Questions the Smart Way

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Mon May 25, 2009 1:31 pm

hi, yeah i get that bit [thanks], but im tryin to compile it so it makes just one file that will install it in one go?
thanks james

User avatar
5eraph
Site Admin
Posts: 4621
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Mon May 25, 2009 1:33 pm


User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Mon May 25, 2009 1:36 pm

5eraph wrote:HINT.
it does'nt install silently its Easy CD-DA Extractor 12?

User avatar
jamesbebby
Posts: 161
Joined: Fri Mar 13, 2009 10:32 am

Post by jamesbebby » Mon May 25, 2009 1:39 pm

hi, can please give me a good link to a autoit tutorial if u know any, thinks thats best [search but know luck really]
thanks for your help!
james

User avatar
5eraph
Site Admin
Posts: 4621
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Mon May 25, 2009 1:53 pm

You can still put them in a self-extracting archive and have the 7-Zip stub run your AutoIt script after extraction.

If you must have the AutoIt compiler package your EXE with your script then try the following line at the start of your script:

Code: Select all

FileInstall('.\Easy.exe', '.\', 1)
FileInstall will not compress the file, and it will not clean up after itself when done.

If you want the file to be deleted after execution then you could try using the following line at the end of your script:

Code: Select all

FileDelete('.\Easy.exe')
The official online documentation is not hard to find, but it's not updated to reflect the latest version of AutoIt.

Post Reply