Can't display image in Dialog using static text control

I'm trying to display an image in a custom Dialog, but I'm having no luck. My control markup looks like this:

<control halign="left" height="18" image="yes" name="waitMessage" type="static" valign="top" width="38" x="19" y="189" />

and my code looks like this:

Dlg.control("waitMessage").image = "..\\images\\Spinner-3.gif";

For some reason the image is never displayed in the Dialog -- there is just an empty background where the image is supposed to be. I know the path to the image is correct because when I use the same path to display an image for a Button control, it shows up as expected.

What am I doing wrong with the static image control?

Your image path seems relative (starting by "..\").
I don't know the exact context (path) you are when your script executes, but maybe an absolute path would be better.

Well, by golly, the absolute path works. I never thought of trying that, since relative paths seem to work just fine with Button controls. Is there a reason for the difference?

I would guess the execution context of a button is not the same as a script. If your current working directory is not the same, the relative path will lead to somewhere different.

The button and the static control are in the same dialog; can't imagine why the working directory would be different. But as long as it works...

Just to push it a bit further -- is there any reason why my animated gifs don't animate in a dialog? They display properly, but only as a static image.

Where is the ../images directory? Relative to what?

I don't think this is supported.

Relative to the "Script Addins" folder and all of its siblings.

Use /dopusdata/Images instead at the start of the path to get that directory. That should work in both places (if not, we can fix it, of course).