How do I add an icon to my executable script file?
Ben:
First, you need to save your script as an Application Bundle. The simplest method is to have it open is SE, do the save, then you will see the Bundle Contents icon light up in the upper right corner of the SE window. Click on that icon, and you will see a list of your new .app bundle contents. Drag and drop your .icns file into that list, and delete the applet.icns file. Then, re-save. That should do it.
Yea but then people can crack open your script and steal all your hard work. That is if you’re not just saving it for personal use.
Or you save it as a read-only bundle. then you can change the icon, but the script file is run only.
How do you do that?
Using Script Editor when you save the file select these options
File Format: Application Bundle
Options: Run Only
And then it works as a bundle but people can’t get into it?
Pretty much… they can get into it so far as they can see the names of file, but if you try opening the included script with Script Editor or any other tool you can’t access view/edit/change the code.
Go head and make a quick “hello world” script and try saving it out as run-only you’ll see =)
Ok thanks I’ll give it a go.
Same here…I’ll let you know how it goes guys…thanks!
What does description.rtfd file in the bundle droplet do? I assume it’s where developer notes can be placed where I can put my notes in?
Okay this doesn’t work…even though I deleted the original script icon, and put my own .icns file, it still displays the old script icon??
Place the script on your desktop and Option (key) drag it to your hard disk - then open your hard disk.
Tom
Operating System: Mac OS X (10.4)
Come again? Option key drag my icon to the bundle contents folder in my script? Im not sure I understand?
Option (key) drag the bundle to hard disk.
Did you rename your custom icon? It must have the same name as the default you removed - “applet.icns” (without the quotes).
Okay, I’m not getting it:
- I place the script (saved as an application bundle with my icons file in the bundle and I’ve deleted the old icon).
- I press option key and drag my application bundle (script) to the hard disk.
No changes!
Please Help!
Did you in fact name your icon to applet.icns?
Is it in the same location as the old one?
Ben:
Sorry about all this; I have not messed with it in a few years, when I was running Tiger. I will try to work on it some more today, but it does not seem to be as simple as I recall.