• 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: Results differ in editor and applet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Results differ in editor and applet


  • Subject: Re: Results differ in editor and applet
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 27 Feb 2004 08:33:12 +1100

On Feb 27, 2004, at 7:08 AM, Mr Tea wrote:

This works (thanks, Paul), but I don't really understand why.

The keywords are a nicety solely for the user when writing and editing a script. You write in keywords, your editor looks them up in the app's dictionary, and what actually gets saved in the script is raw codes. When you open the script in your editor, the editor opens the dictionary and the codes are translated back to keywords for your convenience. (Thus, terminology can change with no ill effects.)

But when you run a script, the editor is not involved and the dictionary is not loaded (thankfully, or we'd have big delays every time) , so only the raw codes are available.

The workarounds are either to force the dictionary to load, or code like this:

tell application "iTunes"
set c to class of current track
if c = audio CD track then
set c to "audio CD track"
else if...

--
Shane Stanley <email@hidden>
_______________________________________________
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: Results differ in editor and applet
      • From: Mr Tea <email@hidden>
References: 
 >Re: Results differ in editor and applet (From: Mr Tea <email@hidden>)

  • Prev by Date: Re: editing HTML
  • Next by Date: Applescript for Acrobat
  • Previous by thread: Re: Results differ in editor and applet
  • Next by thread: Re: Results differ in editor and applet
  • Index(es):
    • Date
    • Thread