Questions about display dialogs and icons

I have a perhaps silly question but i’m frustrated that i can’t find the answer in any documentation. I would like to add the conceit of a picture/icon to a display dialog. I’m familiar with using “icon note/caution/stop” and would like to put my own symbol in. The documentation i’ve been able to find has said the icon property could also use other graphics, called either by name or ID (number?). I’ve tried calling the path name of the .icns file (after creating one with icnsComposer) but that doesn’t work and i’m guessing that it has something do with my not being able to find any corresponding files such as “stop.icns”, “caution.icns” or “note.icns”. Is there anyway of getting the icon in there without resorting to using Applescript Studio/Project Builder?

Which leads to another question. I can’t seem to figure out how to get a custom graphic to appear in a panel/window built with interface builder. After looking through the documentation on Apple’s Mail Search Tutorial, i don’t feel any closer to understanding. In that tutorial a custom icon is added in an “about” window but that window doesn’t appear to come from a corresponding nib so i can’t tell how the icon switch is made. Should i be doing this particular project in a simple script editor or in applescript studio? I feel like applescript studio/project builder is still fairly opaque to me and would require more time than i can justify to pick up, i won’t be using it much.

Thanks for any help

In simple scripts (no studio), you can only use the related “cicn” resources. The word “related” applies to the “guy who runs the code”. Eg, if you save a script as application and you double-click the app in the Finder, the “guy who runs the code” is the applet/droplet itself. If you run the script from Tex-Edit Plus’s script menu or from a script editor, the “guy who runs the code” is Tex-Edit Plus or the script editor.
So, you need a carbon app with resource fork. For some samples, you can run this from Entourage’s script menu:

display dialog "hello" with icon 267

You can create your own “cicn” resources and place them into your app’s resource fork. OSX is not a good tool for "cicn"s. You may need GraphicConverter, which is the only app I know able to export such oldie-format.
So, open your app and the cicn in a tool like Resorcerer and copy the cicn to your app; assign it a “id” number and you are ready to call it from your script!

For images in AS-Studio, just follow this thread:
http://bbs.applescript.net/viewtopic.php?t=5147

Thanks, jj

i went the cicn route using GraphicConverter and ResEdit (balked at the high fee for Resorcerer, and was a little afraid of using good ol’ ResEdit on an OS X app, but it seemed to work just fine). the resulting icon used is pretty small, but i guess with display dialog there isn’t any flexibility in displays so oh well.

thanks for the help