• 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: Is there anything wrong with these two scripts?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there anything wrong with these two scripts?


  • Subject: Re: Is there anything wrong with these two scripts?
  • From: Martin Crisp <email@hidden>
  • Date: Mon, 31 Mar 2003 9:07:02 +1000
  • Organization: Tesseract Computing

On Sat, 29 Mar 2003 18:25:27 +1000, Jim Krenz wrote
(in message <email@hidden>):

[...]

> 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

This worked fine for me (after changing 'current' to a playlist
that exists in my iTunes setup). But I wuld have written it this
way:

tell application "iTunes" to play some track of playlist "current"


> Script #2 (go away script):
>
> tell application "iTunes"
> quit
> end tell

This was fine unless it was run immediately after iTunes had quit,
in which case I received a 'connection is invalid' error.

I wasn't using Youpi Key, as I don't have it, just clicking 'run'
in Script Editor 2.



> ***
>
> Please let me know if there are any errors in syntax, etc., as I am an
> AppleScript newbie.

Only as noted, so it seems Yupi Key is doing something odd, or you
have a timing issue.

Have Fun
Martin
--
I have absolutely no reason to complain about "success" with my
work; [...] And yet, from time to time a boundless sense of
inferiority plagues me, a desperate feeling of general failure; how
does a person acquire such bits of lunacy?
- MC Escher

Almost always SMASHed
_______________________________________________
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.

  • Follow-Ups:
    • Re: Is there anything wrong with these two scripts?
      • From: Jim Krenz <email@hidden>
References: 
 >Is there anything wrong with these two scripts? (From: Jim Krenz <email@hidden>)

  • Prev by Date: Saving people
  • Next by Date: Non-AppleScript access to GUI scripting (System Events) plug-in?
  • Previous by thread: Re: Is there anything wrong with these two scripts?
  • Next by thread: Re: Is there anything wrong with these two scripts?
  • Index(es):
    • Date
    • Thread