Tripredacus Posted September 28, 2007 Share Posted September 28, 2007 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? Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
James Posted September 28, 2007 Share Posted September 28, 2007 You could make it write options to a temporary file. Then when the user saves switch the extension to a .au3 and then when the user clicks run or whatever it will run the .au3 with the AutoIt3.exe file. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Tripredacus Posted October 2, 2007 Author Share Posted October 2, 2007 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. Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
james3mg Posted October 2, 2007 Share Posted October 2, 2007 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 appA 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 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 2, 2007 Share Posted October 2, 2007 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. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
JustinReno Posted October 3, 2007 Share Posted October 3, 2007 @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. Link to comment Share on other sites More sharing options...
Valuater Posted October 3, 2007 Share Posted October 3, 2007 Is there an echo in here????...!!! 8) Link to comment Share on other sites More sharing options...
therks Posted October 3, 2007 Share Posted October 3, 2007 @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') My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
JustinReno Posted October 3, 2007 Share Posted October 3, 2007 ahh, Ok. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now