Jump to content
Sign in to follow this  
MrBlue

File size problem

Recommended Posts

MrBlue

Hello, I'm new to autoit i only just come accross this programming language today and i really like the looks of it although i have one problem, when im creating a program for example with just this little peice of code

RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Something Really Important", "REG_SZ", @ScriptFullPath);omit to not set to startup
While 1
Beep(Random(100,2000,1),200)
$Pos= MouseGetPos()
Tooltip(" Disabled ", $Pos[0]-1, $Pos[1]-1)
Mousemove(@DesktopWidth/2, @DesktopHeight/2); Traps mouse in center of the screen
WEnd

The file is 1kb in .au3 format but when i compile that small peice of code it goes all the way up to 256kb and i find that a little large how can i make it MUCH smaller.

some details

I'm on Vista home premium 32bit and when i compile i choose Unicode.

Thanks for the replys in advance.

Share this post


Link to post
Share on other sites
yucatan

Hello, I'm new to autoit i only just come accross this programming language today and i really like the looks of it although i have one problem, when im creating a program for example with just this little peice of code

RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Something Really Important", "REG_SZ", @ScriptFullPath);omit to not set to startup
While 1
Beep(Random(100,2000,1),200)
$Pos= MouseGetPos()
Tooltip(" Disabled ", $Pos[0]-1, $Pos[1]-1)
Mousemove(@DesktopWidth/2, @DesktopHeight/2); Traps mouse in center of the screen
WEnd

The file is 1kb in .au3 format but when i compile that small peice of code it goes all the way up to 256kb and i find that a little large how can i make it MUCH smaller.

some details

I'm on Vista home premium 32bit and when i compile i choose Unicode.

Thanks for the replys in advance.

hi thats always when u compile the file the size is always 254 kb something abouth that...

but when u have abouth 3000 rules code the file is not bigger then 512 kb or something like that tjat problem cant be fixen u cant make the file smaller the reason they did that because peopel else wanne replace system files like dll's that u program can work as a virus that why they did that.

Share this post


Link to post
Share on other sites
MrBlue

noo that sucks i want the file to be about 20kb or anything smaller than the org would be great any ideas on how i can do it?

Share this post


Link to post
Share on other sites
yucatan

aint posseble in autoit

maby try to make a batch file so a test.bat or test.cmd

that u let the cmd do the jobs u want

u cant make a compiled script smaller dan 256 kb

when u have only 1 charecter in autoit and u compile it will be 256 kb size

so aint posseble sorry

Share this post


Link to post
Share on other sites
Melba23

@MrBlue,

There is a very good reason that your compiled file is 256k plus.

When you "compile" AutoIt, it does not compile in the same way as a language such as C. Your script is added to a run-time interpreter which actually does all the work when you run the exe. This way "compiled" AutoIt exes are fully self-contained and you do not need to use run-time libraries (like many Basic languages).

So AutoIt is neither compiled nor interpreted in the classical sense, but "has been designed to be as small as possible and stand-alone with no external .dll files or registry entries required" (from the Help file).

The actual interpreter stub that "compiling" adds to your script is AutoItSC.bin, which you can find in the Aut2Exe subfolder of your AutoIt installation, and this weighs in at 612,864 bytes! So be glad that the upx compressor is also part of the package - or you would really have something to complain about!

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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  

×