• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Ichat applescript question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ichat applescript question


  • Subject: Re: Ichat applescript question
  • From: John Stewart <email@hidden>
  • Date: Wed, 26 Jan 2005 04:44:38 -0500

On 01/25/05 at -0800 dor kelman said this

>I cant figure out a way to implement
>what I want. Please help me.


Why reinvent the wheel, take a look at iChatStatus
<http://www.versiontracker.com/dyn/moreinfo/macosx/17192>

If you really want to implement this yourself here's the basics of what you need to do.

1) script needs to be saved as a stay open application that contains an idle* handler

2) within the "on idle" handler, you need to check for the song playing in iTunes every few seconds.

3) You would then check this new value (from 2) against a stored/retained value to see if Itunes has changed tracks.

4) if track has changed then update iChat, store the new value (from 2) over the old one (from 3) for your next scheduled iTunes check.

* AppleScript has a built in handler called "on idle". This handler is special in that it's called on a scheduled basis instead of from a line in code. See Apple's (woefully out of date) AppleScript Language Guide 1.3.7 for more info.
<http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/AppleScript.e7.html#pgfId=5468>

JBS
--
Ever wonder about those people who spend $2.00 apiece on those little bottles of Evian water? Try spelling Evian backwards: NAIVE - George Carlin
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Ichat applescript question (From: dor kelman <email@hidden>)

  • Prev by Date: Re: iWork Pages
  • Next by Date: Re: iWork Pages
  • Previous by thread: Ichat applescript question
  • Next by thread: Re: Ichat applescript question
  • Index(es):
    • Date
    • Thread