Sign in to follow this  
Followers 0
auit5

Does it require the TEMP or TMP directory

9 posts in this topic

Hi,

I am very new here, and have used AutoIt V3 for only about a week. It is a wonderful program!

Does AutoIt require the TEMP or TMP directory to be defined before running the compiled form? If yes, is there any way to avoid using the temp directory, or on startup somehow direct it to use a specific directory? Is there a list of functions which are known to require the temp directory?

Cordially, Auit5

Share this post


Link to post
Share on other sites



Syberslug, thank you for the prompt feedback! Well, in my script (compiled) I was not using FIleInstall. Here I see one extra file in the temp dir, after I replaced a set of .cmd script with my AI3 script. I plan to use the script in an enviroment before the temp directories are set... and the current direcotory is readonly. I wonder how I could make sure there is no transient use of temp ...

On another topic, you comment made me lookup FileInstall. The example shows the destination file as .au3, should this not be a .exe file? Or people use .au3 for compiled scirpt too? Now how is this included file referred to from within the compiled script? For example, is it possible to include the splash image to be used by a script included into the script itself (so only one file needed at execution)? Could you please provide a simple example? Thanks.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Syberslug, thank you for the prompt feedback!  Well, in my script (compiled) I was not using FIleInstall.  Here I see one extra file in the temp dir, after I replaced a set of .cmd script with my AI3 script.  I plan to use the script in an enviroment before the temp directories are set... and the current direcotory is readonly.  I wonder how I could make sure there is no transient use of temp ...

On another topic, you comment made me lookup FileInstall. The example shows the destination file as .au3, should this not be a .exe file?  Or people use .au3 for compiled scirpt too?  Now how is this included file referred to from within the compiled script?  For example, is it possible to include the splash image to be used by a script included into the script itself (so only one file needed at execution)?  Could you please provide a simple example?  Thanks.

Temp files are not used when running a compiled script. The script is extracted and run from memory. Period.

Temp files may be used by the compiler though during compilation, but not for running the compiled script.

Edited by Jon

Share this post


Link to post
Share on other sites

what AutoIt version? 3.0.100 or 3.0.102, cause I don't get a temp file from the beta "unstable" version.

<{POST_SNAPBACK}>

Lar, 3.0.102.

Jon, Your reply is very helpful. Now I will concentrate on determining other possible utilities as the temp use culprit :) Thank you both.

Share this post


Link to post
Share on other sites

If you are using BartPE, and the script needs to run from memory, Just don't do a fileinstall. For compiling scripts, the only directory that needs to have write access is the target exe directory.


Who else would I be?

Share this post


Link to post
Share on other sites

Well, I did some experiments. Here is the surprising result! When I run a SplashImageOn, I do get a ~xxxxxx.tmp file in my %temp% directory!! It is possible that this happens only with certain image types, I was using a .jpg. I will do an experiment with .bmp. Perhaps that is the image type used by the experts here? [i lucked out in that the routine did not erase the file after the use -- a minor deficiency in itslef. Otherwise it would have been very difficult for me to locate where the temp file was coming from. :) ]

Share this post


Link to post
Share on other sites

Well, the temporary file is put in the temp dir even for .bmp splash. I was wrong about the file not getting deleted, it does get deleted when the splash image is removed. I was changing the temp directory in the script, and that is why I observed it not getting deleted. The size of the file depends on the size of the image.

Here is a sample script to test this: (need xxx.jpg and xxx.bmp in the current dir)

SplashImageOn ('x', 'xxx.jpg', 40,40);
msgBox (1, 'JPG image', 'Look in your temp directory')
SplashImageOn ('x', 'xxx.bmp',40,40);
msgBox (1, 'BMP image', 'Look in your temp directory')

The temp file is used in running the compiled version too.

Share this post


Link to post
Share on other sites

Lar, Thanks. Is there a way by changing enviroments, etc, before I call the Splash function, that I can force this temp file to be placed in a particular directory of my choice? I thought I had seen this behaviour at some point during my experitments, but now I cannot repeat it :) Well, this is hard on a one week-old user :)

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