Re: Automating ichat, itunes and ical
Re: Automating ichat, itunes and ical
- Subject: Re: Automating ichat, itunes and ical
- From: Andrew Oliver <email@hidden>
- Date: Fri, 28 Jan 2005 20:31:04 -0800
On 1/28/05 7:48 PM, "dor kelman" <email@hidden> wrote:
> I want to use AS in ical to do two things 1. automatically play certain
> songs at certain times and 2. Send instant messages at certain times. I
> tried looking at the Asstudio dictionary but couldn't find the commands to
> doing these things. Can someone tell me how to do these things or better yet
> instead of giving me a fish teach me how to fish. If someone out there has a
> good explanation for me on how to use that dictionary to learn all the
> available AS commands for every individual application. Thank you.
There are three parts to your script, at least two of which AppleScript
can't do itself. AppleScript can do very little on its own but what it
excels at is telling other applications what to do, and that's where the
missing parts fall into place.
The three parts of your script are:
1) automatically play a certain song:
Assuming you're using iTunes to do the actual playing (remember, AppleScript
can't do this on its own), something like:
tell application "iTunes"
play track "blahblah" of playlist "Library"
end tell
2) Send instant messages
Again, remembering that AppleScript can't do jack on its own, I'll use
iChat;
tell application "iChat"
send "doobiedoobiedoo" to "Nickname"
end tell
3) "... at certain times"
Here comes the kicker. This is actually something AppleScript can do on its
own, but in most cases you're better off not doing it that way.
For AppleScript to run on a schedule you typically have an idle handler that
sits around doing nothing but check the time to see if it's the right time
to perform one of the other actions. This is generally inefficient.
A better option may be to some other scheduling software to invoke your
script at the appropriate time. On Mac OS X, 'cron' is the system-level task
scheduler that can call a script on a very flexible basis. Just add a
crontab entry that calls your script when you need it.
Andrew
:)
_______________________________________________
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