Jump to content

Help: Incorperate images with compiled script


Recommended Posts

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
Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...