• 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: Applescript error - NSCannotCreateScriptCommandError
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript error - NSCannotCreateScriptCommandError


  • Subject: Re: Applescript error - NSCannotCreateScriptCommandError
  • From: matt neuburg <email@hidden>
  • Date: Mon, 19 Jul 2004 17:20:19 -0700

On Mon, 19 Jul 2004 16:08:56 -0700, Steve Palmer <email@hidden>
said:
>Yes, I'm sure but the breakpoint on the code that returns the tasks
>isn't being hit.
>
>I guess that at this point I really need some better documentation or
>more sample code. Specifically I'd like to know more about how
>AppleScript resolves "set foo to name of current task" where "current
>task" returns a Task object. Same for "set foo to every task".

Well, "current" is meaningless, so "current task" would have to be the name
of some application property (that is, defined by the application as a
property of the application object) that has a name property. Compare:

tell app "iTunes" to get name of current track

which is

core\getd{
----:obj {
form:'prop',
want:'prop',
seld:'pnam',
from:obj {
form:'prop',
want:'prop',
seld:'pTrk',
from:'null'()
}
}
}

(See my book for more on how to read an Apple event in this format.)

But "every" is an element specifier (see my book for the technical details
on what that means). So:

tell app "iTunes" to get every track

is:

core\getd{
----:obj {
form:'indx',
want:'cTrk',
seld:abso($616C6C20$),
from:'null'()
}
}

The "set foo to" is irrelevant, since that is done by AppleScript, not by
the target app. m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide! NOW SHIPPING...! (Finally.)
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Open Recent menu
  • Next by Date: Re: NSTextField changing first responder on return key not working
  • Previous by thread: Re: Applescript error - NSCannotCreateScriptCommandError
  • Next by thread: screensaver background
  • Index(es):
    • Date
    • Thread