Way to copy an icon from one app to another?

I’ve got an Applescript that creates an alias of Mac OS X’s “Internet Connect” application and puts it on the user’s desktop. Is there a way, via Applescript, that I can change the ICON for that alias? For instance, if I have a file that has icon “A” attached to it at the root of the user’s hard-drive, can I somehow copy-paste that icon into the alias that I just put on the user’s desktop, via Applescript?

Hello Rob Gould,

In my humble opinion (as someone’s who’s only been scripting for a year), you may be able to GUI script what you wish to do using System Events or Extra Suites, although the creator of E.S. has built something similar right into the package in a previous version, (but I believe it has been removed in the current version because it’s author claimed that it never did work properly). Otherwise, again in my opinion, your chances may be slim to none. But give GUI scripting a try first. I would start with attempting to do what you want with keyboard and mouse simulation.

I hope this helps in some way.

Sincerely,

Variable as the shade

ok, how about another plan of attack. How about if I copy an alias file to the user’s desktop with the icon I want and then somehow use Applescript to “change the path” that the alias file uses and redirect that path to point to Internet Connect. Can anyone tell me if that could work?

Hello Rob Gould,

I’ve just tweaked the icon script included in the Extra Suites (penultimate version) package and It works. Icons can be copied and pasted from one file or folder or Application to another. Now, bear in mind that if you arent’t running OS/X 2.8 as I am that you may need to tweak this script further (and also bear in mind that you need to have Extra Suites http://www.kanzu.com/ installed).

Sincerely,

Variable as the shade