Hey is it possible to change the icon of the AppleScript Application, like adium changes its icon depending on status is it possible to do a similair feature in AppleScript
Do mean ‘status’ as in Mail’s new message count behaviour, or specifically Adium’s permanent keep-icon-even-when-quit behaviour?
Well i just mean how it can change the icon, so like the icon can change to a different file
Do you want to alter the dock icon when it’s running, or do you just want a custom icon?
while it is running
Hi semaja,
to change the icon you use:
tell me
set icon image to (load image "thisImage") -- where thisImage is a picture file (eg. thisImage.png), you've added to your project
end tell
D.
thanks again domnik works perfect now, while im posting how would one change a image thats on a window?
I’m guessing you are talking about an image view. Try this:
set newImage to load image "image file"
tell image view "dock icon" of window "main"
set oldImage to its image
set its image to newImage
try
delete oldImage
end try
end tell
set my icon image to newImage
note: the old image needs to be deleted to prevent a memory leak.