Sign in to follow this  
Followers 0
Tripredacus

How to generate an app?

9 posts in this topic

I am wondering if an Autoit app can create a new autoit app by itself. Say I have an app that asks questions, then it would create a script using a reference based on those choices. Then it would save that new app someplace and it could be opened up manually.

As an example, during the imaging process, the program will ask questions such as what video card are you using, or what soundcard are you using. Then after the drive is imaged, it will copy a generated program to the drive, so that when you reboot back into Windows, you can launch this program. It will give the ability to launch the installers for the hardware you selected during the imaging process.

Any ideas of how to do this?

Share this post


Link to post
Share on other sites



Having AutoIT installed on the computer is not an option.

My next idea is that I can create a shell app, that reads what it is supposed to do from an include. That way the shell app can be anywhere, but what buttons it displays and/or what it does will depend on the include. I can create a separate program that creates the include itself during the setup process.

Share this post


Link to post
Share on other sites

Having AutoIT installed on the computer is not an option.

My next idea is that I can create a shell app, that reads what it is supposed to do from an include. That way the shell app can be anywhere, but what buttons it displays and/or what it does will depend on the include. I can create a separate program that creates the include itself during the setup process.

Why specifically is it not an option? Can you not save any files to the computer? (I'm assuming not, since you're wanting to write an app). Remember an .au3 file can be run using just the AutoIt.exe as a standalone program - nothing has to be 'installed' per se. You'd do that by FileInstall() 'ing the AutoIt.exe into your program, then expanding it into the temp dir, for instance, then running it with the path to your generated .au3 script as the parameter.

Alternately, you could FileInstall() the Aut2Exe.exe program, write the .au3 script, compile it in the background, then delete the .au3 script and Aut2Exe.exe files, leaving you a custom AutoIt .exe app

A pre-compiled script (program) can't read client-generated include files, because includes are read at compile time, not run-time. You could use a configuration file like an .ini file to do this, however.


"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110

Share this post


Link to post
Share on other sites

Another (maybe easier?) method would be to first compile the script that asks all the questions and then generates a new script based on the answers. Then use the commandlineswitch /AutoIt3ExecuteScript (read the chapter about "Command Line Parameters" in the help-file) and run the generated script from the compiled one.

That way there would be no need for AutoIt to be installed.

I have personally never used it but it sounds like thats the thing you need.

Share this post


Link to post
Share on other sites

@james3mg: I don't think you can fileinstall the compiler into the executable, I tried it gave me an error that it can't fileinstall bin files which are required with the compiler.

Share this post


Link to post
Share on other sites

Is there an echo in here????...!!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

@james3mg: I don't think you can fileinstall the compiler into the executable, I tried it gave me an error that it can't fileinstall bin files which are required with the compiler.

That's rather odd cus I just did it and it worked fine.

FileInstall('Aut2exe.exe', '__Aut2exe.exe')
FileInstall('AutoItSC.bin', '__AutoItSC.bin')

Share this post


Link to post
Share on other sites

ahh, Ok.

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