• 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: Script commands and the application object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script commands and the application object


  • Subject: Re: Script commands and the application object
  • From: Jim Correia <email@hidden>
  • Date: Wed, 20 Mar 2002 09:01:54 -0500

On Wednesday, March 20, 2002, at 04:40 AM, email@hidden wrote:

Oh, and by the way: my command has no arguments, but I can't get Script Editor to stop displaying it as "timedCopyImage reference -- the object for the command". Invoking it simply as "tell application 'Constrictor' timedCopyImage end tell" works fine, it really has no argument.

The dictionary is just advisory (tells the user what the syntax is). That is why it works fine.

Why is Script Editor doing this? Is this a bug, or a subtlety of AS I'm ignorant of?

When building the dictionary "by hand" in Rez you just say noParams.

I haven't don't much with AppKit scripting, but it appears to build the dictionary for you based on your .scriptSuite files. Casual inspection of the docs doesn't make it obvious to me what construct you use to specify no params.

Note that AppleScript is also a little "weird" when it comes to dispatching object model stuff.

close window 1

tell window 1 to close

are equivalent, but in the first case the object in question is the direct object of the event (the reference you are seeing in your dictionary) and in the second case it is the subject.

Jim
_______________________________________________
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: Converting NSCalendarDate to NSString with local language
  • Next by Date: Re: I have exorcised the deamons!
  • Previous by thread: Converting NSCalendarDate to NSString with local language
  • Next by thread: Re: Script commands and the application object
  • Index(es):
    • Date
    • Thread