Sign in to follow this  
Followers 0
Tomoya

Creating a compiled script from another?

6 posts in this topic

#1 ·  Posted (edited)

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



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

1 person likes this

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

#3 ·  Posted (edited)

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

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

#5 ·  Posted (edited)

try:

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

jos

Edited by Jos
1 person likes this

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

Share this post


Link to post
Share on other sites

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  
Followers 0

  • Similar Content

    • WoodGrain
      By WoodGrain
      Hi All,
      I'm using UseTraySetIcon("shell32.dll", xx) to set my tray icon to a specific icon while running, is there a way I can specify this icon when I compile my script into an exe so my exe icon is the same?
      Thanks!
    • 9252Survive
      By 9252Survive
      Hello Guys, 
      Is there a way to have Auto it Exe messages/line number when you hover over the tray icon just at it shows when you run Au3.?
      For an example, if I the script has paused due to WinWait or Sleep I could hover over the icon and it shows the line where it's at. Is there a way to achieve the same with the compiled exe? 
      Many thanks for the help! 
       
    • Daka
      By Daka
      Hello there,
       
      When I compile script and use it out of the map where 
      the source code is. So just moving main.exe to
      other map, then source code is.
      It breaks with error:
      Line10010
      Error: Subscript used on non-accessible variable

      So I wonder what kind of file do I need to 
      include with .exe file? Or should I do something else?

      Because people that are using needs only .exe file
      just start it and use it, with out source code.

       
    • musicstashall
      By musicstashall
      Excuse me, I did not understand how in the function of Main I can include hundreds of functions of my executable code ?? How to implement this?
    • JohnNash
      By JohnNash
      Weird story. Been using Autoit for more than a year now. But recently moved to a new machine, so did a fresh install, and suddenly I saw menus I never saw before in the editor.
      For example, I Always used to have: Tools>Compile and then it would compile my au3 code. Now, the tools menu has a lot of options but after pressing Compile it goes to a whole new screen specifically for au3 code to select more options, also it debugs my code, which prevents compiling if badly coded.
      Of course this is fine, but I would really like to recompile some old crappy code I wrote, regardless of the mistakes that are still in there, also I am really used to the old setup I had,
      so kind of not done, but how do i get this 'bad'  configuration back? Does it have to do with the au3.properties file? What should I do with it....
      Thanks