Jump to content
Sign in to follow this  
Tomoya

Creating a compiled script from another?

Recommended Posts

Tomoya

I currently have a script (Read "Idea") that I am wanting to work on where I will be giving the user the ability to customize the actual compiled script via settings in a precompiled script I give them.

I am trying to see if that is possible and if so how you would go about doing it. Essentially it would have to recreate the given code using something like FileWrite() and then compile it into a .exe for them to run from there.

Edit: Ok I think I have this figured out after goofing around for a sec and think I have solved my own question by running the autoit.exe with the command line arguments to compile the script. Off to test!

Edited by Tomoya

Share this post


Link to post
Share on other sites
Melba23

Tomoya,

What you want to do is quite possible - I did it as a coding exercise myself some time ago. :)

Just remember that you will need to FileInstall both Aut2Exe.exe and AutoItSC.bin if AutoIt is not installed on the user's machine. ;)

M23

  • Like 1

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
Tomoya

Tomoya,

What you want to do is quite possible - I did it as a coding exercise myself some time ago. :)

Just remember that you will need to FileInstall both Aut2Exe.exe and AutoItSC.bin if AutoIt is not installed on the user's machine. ;)

M23

I was just wondering how I would do that with the autoit.exe and I guess FileInstall() is the perfect solution. I was reading somewhere about a programming "game" that someone used to play with languages with their friends where they would try to get the program to echo it's source code in as few lines as possible. It's actually quite fun to try.

Thanks where I got the idea, thanks for the help.

Edited by Tomoya

Share this post


Link to post
Share on other sites
Tomoya

Maybe I am missing something but every time I try to run the following code I get a popup box from Aut2exe.exe saying "Command Line Parameters:" and listing them out. Is this correct?

ShellExecute("Aut2exe.exe", " /in <B:\Folder\Auto It\TestScript\Test\Test.au3>")

Share this post


Link to post
Share on other sites
Jos

try:

ShellExecute("Aut2exe.exe", ' /in "B:\Folder\Auto It\TestScript\Test\Test.au3"')

jos

Edited by Jos
  • Like 1

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Tomoya

try:

ShellExecute("Aut2exe.exe", ' /in "B:\Folder\Auto It\TestScript\Test\Test.au3"')

jos

That works. I guess the helpfile was a little misleading on the subject and I followed it to literal. :sweating:

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  

  • Similar Content

    • drapdv
      By drapdv
      So, I have this odd issue happening with UIAWrappers.  When I run simplespy.au3 through SciTE, it finds the object I'm trying to work with, no problem. But, when I compile simplespy.exe, it can't find it.  Another script that utilizes UIAWrappers is experiencing the same phenomenon. EDIT: Compiling as 32-bit or 64-bit does not affect this behavior.
      The trouble starts at the very first object I try to get via _UIA_getObjectByFindAll, so I included the $properties2Match array and the object properties that were returned by _UIA_getPropertyValue for that first object both when running from SciTE and when compiled.
      It always finds the matches for the title and control type properties.  But when compiled, it fails to find the Automation ID property.  Any ideas as to why this would be happening?  Hoping junkew will see this and have an idea.
       
      These are the $properties2Match
      30005|Screen/PVN - ###.###.##.## - CDK Drive|0|False
      30003|50032|0|False
      30011|Portal|0|False
       
      Object properties when running from SciTE:
      <propertymatching>       
              j:1 propID:[30005] expValue:[Screen/PVN - ###.###.##.## - CDK Drive]actualValue:[Screen/PVN - ###.###.##.## - CDK Drive]1
              j:2 propID:[30003] expValue:[50032]actualValue:[50032]1
              j:3 propID:[30011] expValue:[Portal]actualValue:[Portal]1  
      </propertymatching>
       
      Object properties when script is compiled:
      <propertymatching>
              j:1 propID:[30005] expValue:[Screen/PVN - ###.###.##.## - CDK Drive]actualValue:[Screen/PVN - ###.###.##.## - CDK Drive]1
              j:2 propID:[30003] expValue:[50032]actualValue:[50032]1
              j:3 propID:[30011] expValue:[Portal]actualValue:[]0  
      </propertymatching>
       
    • FrancescoDiMuro
      By FrancescoDiMuro
      Good evening everyone
      I was trying to compile my executable, adding #pragma directives instead of #AutoIt3Wrapper* directives, and, I don't know why the #pragma compile doesn't add the Author field to the executable.

      These are the directives:
      #pragma compile(Author, 'Surname Name') ; or #pragma compile(Author, Surname Name)
      and this is the output, in both cases:
       
      - #pragma directive Author found but don't understand it so will ignore: #pragma compile(Author, 'Surname Name') - #pragma directive Author found but don't understand it so will ignore: #pragma compile(Author, Surname Name) What am I missing?
      Thanks

      Francesco
    • Barrtrek
      By Barrtrek
      I get the "Unable to add resources" error related to AppData\Local\AutoIt v3\Aut2Exe when compiling with a large FileInstall of a 1.5GB file.  Is there a size limit I need to be aware of?  I've also disabled or removed Trend from three different machines and had the same results.  I've had issues like this in the past but have compiled after the Aut2Exe folder was excluded in AV.  That doesn't seem to be the problem this time around.  If I comment out the FileInstall the script compiles successfully.
    • Earthshine
      By Earthshine
      This baby can do almost any language! I found Gleany on this site and set it up on a fresh win10 install. all i would need to do to make it build an exe of the search files app we discovered is the .NET Target Framework download to build 100 % but the exe works and generates! You also need to add the path the the version of csc.exe that you want to run. MSBuild is part of .NET and can read your .csproj file.
      YOU can develop .NET OR C/C++ on this baby!
      Super lightweight (fit for crappy laptops), and you can use any dev compilers you wish, Ming, MS, etc, whatever.
      To use the build, you need to open the csproj file, else, to check your syntax it can compile individual files as well. The warning are because I do not have the .NET 4.6 Targeting Pack installed... LOL, and I could get rid of the Core warning, yes, I did not want to build a .NET Core.dll I wanted a live x64 exe! Told you MSBUILD could handle .CSPROJ, .VBPROJ, and all others Microsoft. Don't let Visual Code or Visual Studio slow you down, although, this works with Visual Code as well but there is only debugging in CORE.DLL projects

      ListFiles Example.zip
       

    • XinYoung
      By XinYoung
      Hello all,
      I've been working on 4 standalone scripts. They each have their own GUI and are now independent .exe's. But instead of having 4 separate icons on my computer, is it possible to put them all together into one .exe?
      What I want is one interface with tabs. Each script's GUI would be on their own respective tab. Is this possible?
      The different scripts don't need to communicate with one another. I just want them all in one .exe.
      I can't find this anywhere... Any help would be greatly appreciated. Thank you!
×