Change app Icon when script is completed.

In a recent topic, I asked how I could run a shell code without having to deal with terminal opening.
What I'm trying to accomplish now is to make my app change it's icon when the code is complete.

(With complete I mean when the process is done.)

Thanks in advance. :slight_smile:

You mean run a script in xterm iconified and at the end of the script, change the icon title and wait for viewing or return to command prompt? Sounds like a tk-tcl thing, no: http://www.ibiblio.org/pub/Linux/docs/HOWTO/Xterm-Title.

Thank you DGPickett.
I'm quite new to this so I don't try to get ahead of myself but I will try reading and understanding it.

Again
I've just made a simple script in AppleScript-editor that tells a driver to enable a device and saved it as an app. (rather than start terminal and enable it from there) I've manually replaced the Icon of the app in it's content. I want that Icon to change to another Icon when the process complete.

It's a small step, but eventually there is going to be a lot more to it.
I also want the icon of the app to change back to the default icon when the device is turned off. But I think it requires the source code of the driver and most likely more programming language :wink: ( Chances are that it isn't even possible to do so, because the device is officially unsupported )

Probably easy to do, if you google for the right words. My case was for x and simple UNIX; I am no Apple guts guru. Is it shell script or AppleScript?

I created it in AppleScript.

I tried to google for it with keywords like "Change icon Applescript process complete" and things similar to that, but all I could find are topics like "How to I change icon of a app?" etc..

I do not wish to start a topic for every question I might have, but I don't know where else to turn.

Well, I expect the applescript has to loop or something at the tail of the script after asking for the icon change, so process complete is asking too much of google. Less is more, but the hit is discouraging: changing icons with an AppleScript ? [Archive] - The macosxhints Forums
or not free: http://change-applescript-icon.fyxm.net/

I think I found it, but I don't know how to reference it to it's own application/Resources folder.

icon of application "icon path"

Any idea how to do so?
Thank you.

Google AppleScript Resources folder ?

I search google for several hours, I just couldn't find a clear answer.
I don't even know if it's possible to do in AppleScript.

Maybe Xcode can do that?
That didn't gave me much results either btw.

application Resources folder applescript - Google Search

Thanks, but it doesn't work for me.
The only positive results I got are "Contents:Resources:MyFile" but applescript says it cannot find the path.

I also tried to add my app name to it, no luck there either.
Some say you might need to write down full path, MAC/HD/ etc... but that would be kinda silly because no one uses the exact same name.