Jump to content

WrapIt


Melba23
 Share

Recommended Posts

  • Moderators

Hi all,

A couple of recent threads have brought up the idea of an AutoIt script compiling another script from within itself - in both cases I mentioned that I had done such a thing as a coding exercise in the past. I thought it might be useful to show how such a thing could be done - so I went back to my old code (it was actually the first large script I ever wrote in AutoIt back in 2008 :o) and updated it for the current release.

The idea for WrapIt came from theWRAP - I found this app very useful as I was dabbling in JBasic at the time and was getting annoyed with all the run-time and image files that were needed to get the code to run. The idea of packing them all into a single executable which would expand them, run one of the expanded executables, and then delete all the files again seemed a good solution. However, as the author of theWRAP had left us the only available (unregistered) version was very limited in the number of files it could wrap. I was also investigating AutoIt at that time (you can guess which one I adopted long term! ;)) and realised that I could do the same sort of thing using FileInstall and Run. And so here is my version - WrapIt.

The zip contains the following:

WrapIt.au3 - the script

WrapIt.ico - an icon for the executable when compiled

WrapIt_Default.ico - a default icon for the wrapped executable

WrapIt.chm - a help file

There are also 3 of my UDFs which I have now incorporated into the script (replacing some very clunky code from 2008! :D)

GUIExtender.au3, ChooseFileFolder.au3, RecFileListToArray.au3

And here it is: WrapIt.zip

Just unzip them all into a folder and have a play. You will need to set the correct path for your own versions of Aut2Exe.exe, AutoItSC.bin, and upx.exe in the FileInstall string literals at lines #252, #253 and #256 - you do not need to compile the script for it to work.

As I only did this as a coding exercise (and no longer use JBasic so no longer need the capability) I am not really interested in maintaining the script. However, comments on how it might be improved are always welcome - it is never too late to learn. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
Share on other sites

Thanks for sharing!

I can remember being involved in a discussion over this ability quite some years ago, and the end result, if I remember rightly, was that you'd need most of the AutoIt install, which was deemed too clunky or undesirable to include in most instances, far better to point out and/or supply a full AutoIt install as a mandatory requirement.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

  • 2 years later...
  • Moderators

TheDecoder,

The compilation process for AutoIt changed with the release of v3.3.10.0 and that file is now longer needed - you now only need Aut2Exe (and upx if you want to compress the result).

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

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...