Re: Results differ in editor and applet
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.