AppleScript distributing an icon with scripts

I want to distribute an icon that is used in my script dialogs like so:



set rxIcon to (path to application support folder as string) & "RX Consulting:Resources:RXIcon.icns"

set opType to display dialog "Would you like to consolidate, rename, or both?" with icon file rxIcon buttons {"Rename", "Consolidate", "Both"} default button "Both"


On my machine, I just created a directory in application support and placed the icon there, which is the path in the script as you can see. Is that the appropriate place for something like this when building an installer pkg?

Answered by red_menace in 422450022

Your installer would need to place the file there before it can be used like that. You can also place the icon file in the application bundle's Contents/Resources folder and access it using path to resource.

Accepted Answer

Your installer would need to place the file there before it can be used like that. You can also place the icon file in the application bundle's Contents/Resources folder and access it using path to resource.

Thanks

AppleScript distributing an icon with scripts
 
 
Q