Jump to content
Sign in to follow this  
Swimming_Bird

Help: Incorperate images with compiled script

Recommended Posts

Swimming_Bird

Sorry, i looked all over the place and am quite suprised that i was unable to find any information on this.

Mainly I'm curious as to how i can incorperate images used in the gui with the compilex exe without having the image extracted to a temporary folder for use.

Thx and sorry for the dumb question.

Edited by Swimming_BIrd

Share this post


Link to post
Share on other sites
Swimming_Bird

how do you go about making images useable with compiled exes on any machine?

Share this post


Link to post
Share on other sites
GaryFrost

For example place near top of script:

If @Compiled Then
    If Not FileExists(@ScriptDir & "\myimage.gif") Then FileInstall( "myimage.gif", @ScriptDir & "\myimage.gif")
EndIf

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
Swimming_Bird

hrm, if i set the destination of the file to a temp directory and the location of the image to be the temp directory would that work?

how often/when is the temp folder cleaned?

Share this post


Link to post
Share on other sites
LxP

hrm, if i set the destination of the file to a temp directory and the location of the image to be the temp directory would that work?

Most definitely -- this is how I handle GUI images in my scripts.

how often/when is the temp folder cleaned?

It is best practice to delete this file yourself when your script is exiting:

local $picPath = @tempDir & "\guiPic.bmp"
guiCtrlCreatePic($picPath, ...)
...
fileDelete($picPath)

Regards,

Alex Peters

Share this post


Link to post
Share on other sites
Swimming_Bird

thanks for the help

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  

×