Sign in to follow this  
Followers 0
StAbb

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

4 posts in this topic

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

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