Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to automatically cycle iChat AV buddy icons Apps
I just wrote a nice AppleScript, Switch Icon, that uses images.google.com to cycle the iChat buddy icon through 20 selected images. Start iChat, then start the "Switch Icon" script and reply to the dialog asking if you have GraphicConverter installed (for nice cropping). Then enter an initial search string (i.e. red porsche or Mac G5, etc.) and it will start cycling a new icon every 10 seconds.

The second script, "Switch Icon Query", is a two-liner that can be placed into the script menu and will just reset the query string to something different.

If anybody knows how to crop JPEG images from AppleScript with its built-in tools, please let me know. The main script is only tested with iChat AV - not sure if it works with iChat 1.0 or not.

[robg adds: The Switch Icon script is somewhat long, so rather than attempt to format it for display in Geeklog, I just put both files online in a stuffed archive: switch_icons.sit [42kb download]. I've tested the script, and it works as described. If you think 10 seconds is too often (not often enough) to change your iChat icon, just edit the second to last line in the script -- the line that reads return 10 is the delay line, and 10 is the delay in seconds.]

    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[8,281 views]  

A script to automatically cycle iChat AV buddy icons | 10 comments | Create New Account
Click here to return to the 'A script to automatically cycle iChat AV buddy icons' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to automatically cycle iChat AV buddy icons
Authored by: konakona on Aug 07, '03 10:12:51AM

So, does this mean that we can have album art of the current iTunes track as our buddy icon.....

That would be amazing!



[ Reply to This | # ]
Try iChatStatus and These Scripts!!!
Authored by: DougAdams on Aug 07, '03 11:45:57AM
Try these wicked cool iChatStatus AppleScripts by Daryl Hawes. They include a script that will take the artwork from the current track and make it your iChat buddy icon. Other's let you put an AMAZING amount of stuff in your iChat AV staus!

Doug
Doug's AppleScripts for iTunes

---



[ Reply to This | # ]

Try iChatStatus and These Scripts!!!
Authored by: locklin on Aug 07, '03 01:14:48PM

I can't make this to happen!!, I have all my tunes in iTunes 4.0.1 with artwork and iChat AV.

I can only see my current song and no Artwork but my personal icon.

Brian



[ Reply to This | # ]
Try iChatStatus and These Scripts!!!
Authored by: konakona on Aug 07, '03 06:24:56PM

yup, same problem here....



[ Reply to This | # ]
Try iChatStatus and These Scripts!!!
Authored by: HuntingBears on Aug 07, '03 11:23:03PM

There's a bug in the script which causes it to return a value before it has a chance to set the buddy icon. I've contacted the author of the script and he'll be posting an updated version on his site soon. In the meantime, here's a slimmed down version.

To use, copy and paste the following code into a new AppleScript document and save it in ~/Library/Application Support/iChatStatus/


tell application "System Events"
  if ((application processes whose (name is equal to "iTunes")) ¬
    count) is greater than 0 then
    tell application "iTunes"
      if player state is playing then
        set the_artist to artist of current track
        set the_song to name of current track
        if artworks of current track exists then
          set currentArt to data of front artwork of current track
          my iChatIconFromArtwork(currentArt)
        end if
        if the_artist is not missing value then
          return the_artist & " - " & the_song
        else
          return the_song
        end if
      else if player state is paused then
        return "iTunes is paused"
      else if player state is stopped then
        return "iTunes is quiet"
      end if
    end tell
  else
    return "iTunes is Off"
  end if
end tell

on iChatIconFromArtwork(inArt)
  tell application "System Events"
    if ((application processes whose (name is equal to "iChat")) ¬
      count) is greater than 0 then
      tell application "iChat"
        try
          set file_name to ":tmp:artwork2avatar.pict" as string
          try
            do shell script "rm /tmp/artwork2avatar.pict"
          end try
          open for access file_name write permission 1
          copy the result to file_reference
          write inArt starting at 0 to file_reference as picture
          close access file_reference
          set theImage to open for access file file_name ¬
            without write permission
          set imageData to read theImage as TIFF picture
          set image to imageData
          close access theImage
        on error errStr
          try
            close access file_reference
          end try
          display dialog "Error: " & errStr
        end try
      end tell
    end if
  end tell
end iChatIconFromArtwork



[ Reply to This | # ]
Try iChatStatus and These Scripts!!!
Authored by: konakona on Aug 07, '03 11:32:18PM

Wow! It works.

What an amazing bunch Mac users are!



[ Reply to This | # ]
Try iChatStatus and These Scripts!!!
Authored by: locklin on Aug 10, '03 07:18:45PM

Thanks a lot, now it works...

locklin



[ Reply to This | # ]
Watch out...
Authored by: thelamecamel on Aug 08, '03 02:38:37AM

I'd be careful using this script. As much as I trust Google's image filters, this could easily prove embarrassing...



[ Reply to This | # ]
A script to automatically cycle iChat AV buddy icons
Authored by: dwchin on Aug 10, '03 01:27:18AM

iChatStatus invariably makes my Mac (TiBook G4 667MHz, OS X.2.6) crash. Really annoying. I don't know if it's just iChatStatus, or iChatStatus's interaction with some other stuff I have.

Anyhow, to address the cropping in a script, if AppleScript can call a shell script, I'm moderately certain that ImageMagick++ has command-line utitlities to munge up JPGs. It's in the Fink package.



[ Reply to This | # ]
A script to automatically cycle iChat AV buddy icons
Authored by: ad7am on Feb 17, '06 10:07:22AM

Anyone know how to convert this script (or create another) to switch randomly application icons? I use Cmd-Tab all day, and would love to have a different one of these << http://interfacelift.com/icons-mac/details.php?id=1739 >> appear each time to represent Mail.app. Thanks!



[ Reply to This | # ]