ZipperZ Posted August 26, 2005 Posted August 26, 2005 Is there any way to implent another exe i to a script?
Raindancer Posted August 26, 2005 Posted August 26, 2005 Look in the Help for FileInstall() Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
w0uter Posted August 26, 2005 Posted August 26, 2005 or you could make a self extracting archive you could even write the file in hex from a dllcall. (fileinstall and SEA is smallest) My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
Raindancer Posted August 26, 2005 Posted August 26, 2005 or you could make a self extracting archiveyou could even write the file in hex from a dllcall. (fileinstall and SEA is smallest)<{POST_SNAPBACK}>Wicked things are possible with AutoIt Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
ZipperZ Posted August 26, 2005 Author Posted August 26, 2005 there isnt any fileinstal() in my help file...
w0uter Posted August 26, 2005 Posted August 26, 2005 Function ReferenceFileInstall --------------------------------------------------------------------------------Include and install a file with the compiled script.FileInstall ( "source", "dest" [, flag]) Parameterssource The source path of the file to compile. This must be a literal string; it cannot be a variable. dest The destination path with trailing backslash. This can be a variable. flag [optional] this flag determines whether to overwrite files if they already exist: 0 = (default) do not overwrite existing files 1 = overwrite existing files Return ValueSuccess: Returns 1. Failure: Returns 0. RemarksThe FileInstall function is designed to include files into a compiled AutoIt script. These included files can then be "extracted" during execution of the compiled script if the statement is executed. Keep in mind that files such as images can greatly increase the size of a compiled script.The source file must be a string and not a variable so that the compiler can extract the filename to include. The source cannot contain wildcards.When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation).Files maintain their original creation/modification timestamps when installed. Related#Include Example; Include a bitmap found in "C:\test.bmp" with the compiled program and put it in "D:\mydir\test.bmp" when it is run$b = TrueIf $b = True Then FileInstall("C:\test.bmp", "D:\mydir\test.bmp") My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
ZipperZ Posted August 26, 2005 Author Posted August 26, 2005 that's not what i'm wanting... I want to write script and input in it exe. Lets say i start my script it creates another exe (whitch is inside it)send command to it and delete it...
Raindancer Posted August 26, 2005 Posted August 26, 2005 that's not what i'm wanting... I want to write script and input in it exe. Lets say i start my script it creates another exe (whitch is inside it)send command to it and delete it...<{POST_SNAPBACK}>That is exactly what you need FileInstall() for... Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
ZipperZ Posted August 26, 2005 Author Posted August 26, 2005 Oh thanx! FileInstall("C:\test.bmp", "D:\mydir\test.bmp") i thought it allways take test.bmp from C:\... but when i compiled..
Raindancer Posted August 26, 2005 Posted August 26, 2005 Oh thanx! FileInstall("C:\test.bmp", "D:\mydir\test.bmp")i thought it allways take test.bmp from C:\... but when i compiled..<{POST_SNAPBACK}>When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation). Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer
seandisanti Posted August 26, 2005 Posted August 26, 2005 that's not what i'm wanting... I want to write script and input in it exe. Lets say i start my script it creates another exe (whitch is inside it)send command to it and delete it...<{POST_SNAPBACK}>yes, that's what fileinstall() does. you give it a file and tell it where you want the file to go when the script is run. it is then included in the file. then you can include in your script a runwait() to the exe (at the known path that you specified in code) and the very next line would be filedelete("c:\myfile.blah") effectively deleting your included executable. i don't think your script can be deleted within itself, just because it's in use as it's executing and can't delete a file that's in use. I think you could create a batch file to delete your script, and just call it with a run() at the end of your script to have it delete the script and itself. not sure why you'd want to do that though...
ZipperZ Posted August 26, 2005 Author Posted August 26, 2005 Damn I've didn't noticed that thanx again
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