Jump to content

How to generate another .exe with new data from a previously compiled script?


Recommended Posts

Hey guys, I recently made a little FTP up loader using the awesome FTP UDF posted here a while ago and I was just curious as to how I would be able to have a compiled autoit script create another .exe in the same directory which contains variables in it which have been declared with input data from the first script.

Thanks a lot guys, any help would be greatly appreciated.

-Steve

Link to comment
Share on other sites

To save any data you need you have 2 alternatives:

Easy One:Use AU3 Native INI functions: Just search for IniWrite in the help file

Difficult One:Use MSXML, search for XMLDomWrapper here in the forums.

With the data you want prepared,you can include AU3 Compiler (Sorry if the license forbids this,i don't know,but if it does forget it),modify the script to FileInstall() your newly created file,then read the data with it. You can write the variables directly to the script,but this could lead to lots of problems if not well managed.

Link to comment
Share on other sites

I don't believe thats possible without doing something as outlandish as "Fileinstall()"ing the Aut2Exe compiler along with all its dependencies within the first script and executing a compile via command line or something.

At any rate, why would you want to create another .exe? You say you want it to "contain variables in it which have been declared with input data from the first script."

To me that sounds like a job for a text file. Maybe an encrypted text file if you are woried about nosey end-users.

Edited by Paulie
Link to comment
Share on other sites

To save any data you need you have 2 alternatives:

Easy One:Use AU3 Native INI functions: Just search for IniWrite in the help file

Difficult One:Use MSXML, search for XMLDomWrapper here in the forums.

With the data you want prepared,you can include AU3 Compiler (Sorry if the license forbids this,i don't know,but if it does forget it),modify the script to FileInstall() your newly created file,then read the data with it. You can write the variables directly to the script,but this could lead to lots of problems if not well managed.

Thank you very much for your fast response, I think I'd be better off writing to an .INI, but I know nothing about reading the data from the script, would I have to modify the Wrapper above the script to save the input variables resources some how?

Thanks again.

I don't believe thats possible without doing something as outlandish as "Fileinstall()"ing the Aut2Exe compiler along with all its dependencies within the first script and executing a compile via command line or something.

At any rate, why would you want to create another .exe? You say you want it to "contain variables in it which have been declared with input data from the first script."

To me that sounds like a job for a text file. Maybe an encrypted text file if you are woried about nosey end-users.

Yea I wouldn't want to FileInstall the Aut2Exe and run the compiler from my script, I don't know how efficient that would be or if it would even be possible. Yea I did think about writing to a text file and then using that info the next time the same script is run, so the user will not have to input the data twice, but I was just mainly curious about having a compiled script generate another compiled script, I didn't really think it was possible but I was just curious. Thanks for your help though man.

Edited by StAbb
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...