Re-load static image loaded via loadimage?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
bbrink
Pro Scripter
Posts: 71
Joined: Thu Dec 31, 2009 2:36 am
Location: Minnesota
Contact:

Re-load static image loaded via loadimage?

Post by bbrink » Wed Jan 03, 2018 3:31 pm

Hi,

I have an image control in a dialog script that uses a static image, so the image is stored in the script. during script execution that image is replaced with dynamic images, via:

SetDialogProperty>Dialog1,msImage1,LoadImage,%MyThumbnailsFolder%\%cimageurl%

When I done with the dynamic images I'd like to have the dialog display the original static image, but I cannot figure out how to reference it. I know I could use two over-lapping image fields but I am trying to avoid clutter in dialog designer. So, as stated in the subject line, how do I re-load static image loaded via loadimage?

Thanks in advance,

Bob

User avatar
JRL
Automation Wizard
Posts: 3530
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Re-load static image loaded via loadimage?

Post by JRL » Thu Jan 04, 2018 2:07 am

...but I am trying to avoid clutter in dialog designer.
If you really want to avoid clutter don't put the image in the dialog. Instead, use the Editor's "Import Binary File" under "Tools" to import the image into the script. Then put an ExportData> line near the top of your script to write that imported image to a file. Then use the same SetDialogProperty>Dialog1,msImage1,LoadImage,FilePath\FileName to display the initial and closing image in the dialog.

bbrink
Pro Scripter
Posts: 71
Joined: Thu Dec 31, 2009 2:36 am
Location: Minnesota
Contact:

Re: Re-load static image loaded via loadimage?

Post by bbrink » Thu Jan 04, 2018 12:07 pm

Very cool feature I was totally unaware of. It worked perfectly and I see lots of other ways to use it too!

Thanks again!

Bob

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts