MrBlue Posted January 14, 2009 Share Posted January 14, 2009 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. Link to comment Share on other sites More sharing options...
yucatan Posted January 14, 2009 Share Posted January 14, 2009 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. Link to comment Share on other sites More sharing options...
MrBlue Posted January 14, 2009 Author Share Posted January 14, 2009 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? Link to comment Share on other sites More sharing options...
yucatan Posted January 14, 2009 Share Posted January 14, 2009 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 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 14, 2009 Moderators Share Posted January 14, 2009 @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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now