Re: Is there anything wrong with these two scripts?
Re: Is there anything wrong with these two scripts?
- Subject: Re: Is there anything wrong with these two scripts?
- From: Rafael Marquez <email@hidden>
- Date: Sat, 29 Mar 2003 22:22:48 -0600
Hi Jim,
I'm a newbie myself. I was able to reproduce an iTunes error with your
first script. The way I got the error to go away, was by rewriting your
script like this:
tell application "iTunes"
activate
tell user playlist "name of the playlist"
play
end tell
end tell
You can define which song to play by instead of saying "play" telling it
"play track 5" or whatever the number is of the track you want it to play.
It also works if you just leave it to play from the "source library" like
you had it. The second script, looks fine to me.
My 2 cents :-)
On 3/29/03 8:25 PM, "Jim Krenz" <email@hidden> wrote:
>
Hello,
>
>
I am using two AppleScripts to make iTunes act like an alarm clock. The
>
scripts are being run from a utility (Youpi Key) at scheduled times.
>
>
With Youpi Key, I am getting an error with the second script. Either it
>
quits iTunes, restarts it, and then quits again, or I get the following
>
error: "Applescript error number -609. iTunes got an error.. Connection
>
is invalid."
>
>
If I run the two scripts as compiled applications with Cron, then
>
neither error shows up. So I suspect that this is indeed a bug on Youpi
>
Key's part.
>
>
I am trying to troubleshoot this with the Youpi Key author, and I want
>
to make sure that I don't have any errors in my AppleScripts. Here they
>
are:
>
>
Script #1 (wake up script):
>
>
tell application "iTunes"
>
activate
>
tell source "Library"
>
tell playlist "current"
>
play some track
>
end tell
>
end tell
>
end tell
>
>
Script #2 (go away script):
>
>
tell application "iTunes"
>
quit
>
end tell
>
>
***
>
>
Please let me know if there are any errors in syntax, etc., as I am an
>
AppleScript newbie.
>
>
Thanks!
>
>
Jim
>
Jim Krenz
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
--
"Time is really the only capital that any human being has, and the one thing
that he can't afford to lose." - Thomas Alva Edison (1847-1931).
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.