SniperSA Posted June 24, 2007 Share Posted June 24, 2007 This might not be possible, but hypothetically can you take a compiled .au3 script (.exe) and run a .au3 with it on a computer that doesn't have AutoIt V3 installed? Link to comment Share on other sites More sharing options...
narayanjr Posted June 24, 2007 Share Posted June 24, 2007 Why not make both of them .exe's? Link to comment Share on other sites More sharing options...
SniperSA Posted June 24, 2007 Author Share Posted June 24, 2007 I was thinking of making a program that wrote .au3 with the FileCreate() method, and then it wouldn't work after that cause I would need the .exe that creates the .au3 to run it. Link to comment Share on other sites More sharing options...
Generator Posted June 24, 2007 Share Posted June 24, 2007 I was thinking of making a program that wrote .au3 with the FileCreate() method, and then it wouldn't work after that cause I would need the .exe that creates the .au3 to run it.FileInstall()... Link to comment Share on other sites More sharing options...
SniperSA Posted June 24, 2007 Author Share Posted June 24, 2007 Thanks!, I will try that now (if only I could think of an idea...). Link to comment Share on other sites More sharing options...
herewasplato Posted June 24, 2007 Share Posted June 24, 2007 You can use _FileCreate or FileInstall, but like you said, you... ...would need the .exe that creates the .au3 to run it. Look in the help file > Running Scripts Form3: Compiled.exe [/ErrorStdOut] [/AutoIt3ExecuteScript file] [params ...] Execute another script file from a compiled AutoIt3 Script File. Then you don't need to fileinstall another copy of AutoIT3.exe in your compiled file.Here are several sripts that use the /AutoIt3ExecuteScript switch to run a second script that was created by the main script: http://www.autoitscript.com/forum/index.php?showtopic=22531 The macro named @AutoItExe will (according to the help file) return:The full path and filename of the AutoIt executable currently running. For compiled scripts it is the path of the compiled script.I added the bold. -MSP- [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
SniperSA Posted June 24, 2007 Author Share Posted June 24, 2007 So, wait, how would I use that? Link to comment Share on other sites More sharing options...
herewasplato Posted June 24, 2007 Share Posted June 24, 2007 So, wait, how would I use that?You would use it to "...take a compiled .au3 script (.exe) and run a .au3 with it on a computer that doesn't have AutoIt V3 installed?" @AutoItExe tells the compiled script to use itself to run your au3 file. You can create or install the au3 file many different ways. The examples that I posted just uses FileWrite to create the au3. You could use FileInstall, but then you could not create the au3 on the fly - using info gathered from the user by the main compiled EXE. [unless you had the scripts talk to each other.] Or maybe you had something else in mind - like you could give someone a compiled AutoIt EXE that does nothing but prompt the user for the path to an au3 that they wrote and then your EXE runs that au3. ...I don't know, how would you use the info that I pointed to? :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
SniperSA Posted June 24, 2007 Author Share Posted June 24, 2007 Well ok, here is an example: #include <File.au3> _FileCreate("Test.au3") $1 = FileÜ[ ][ÝÕÝ]LÉ][ÝË B[UÜ]S[J ÌÍÌK ][ÝÓÙÐÞ ÌÎNÉÌÎNÂb33µFW7Bb33²gV÷C²¤fÆT6Æ÷6Rb33c³£´ç6W'BgVæ7FöâFò'VâgV÷CµFWйÔÌÅÕ½Ðì( Link to comment Share on other sites More sharing options...
herewasplato Posted June 25, 2007 Share Posted June 25, 2007 Try this:#include <File.au3> _FileCreate("Test.au3") $1 = FileO[ ][ÝÕÝ]LÉ][ÝËB[UÜ]S[J ÌÍÌK ][ÝÓÙÐÞ ÌÎNÉÌÎNËb33µFW7Bb33²gV÷C²¤fÆT6Æ÷6Rb33c³ ¥'VâWFôDWRfײgV÷C²ôWF%ÐÍáÕÑMÉ¥ÁÐÅÕ½ÐìµÀìMÉ¥ÁѥȵÀìÅÕ½ÐìÀäÈíQÍйÔÌÅÕ½Ðì¤I did not mean to sound rude in my last post - I thought that you were looking for ideas/ways to use the concept of running a script from a script. Hence my:...I don't know, how would you use the info that I pointed to? :-)The code above works as an au3 or as a compiled script.It makes another test.au3 file and runs it.I changed this: $1 = FileOpen("Test.au3",2) in your code.The sample code that I pointed you to was about how to move a MsgBox to other places on the screen... just as a way to demonstrate the power of AutoIt3ExecuteScript....hope this helps... [size="1"][font="Arial"].[u].[/u][/font][/size] 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