O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSScriptCommand — Mac OS X 10.0

Synopsis

This class represents a scripting statement in Cocoa’s scripting system. A scripting statement is something like “set bounds of front window to 1104, 360, 1280, 561}”. When an application receives the Apple Event corresponding to this script statement, it is translated into an instance NSScriptCommand.

image with no caption

@interface NSScriptCommand : NSObject <NSCoding>
                                  // Initializers
   - (id)initWithCommandDescription:(NSScriptCommandDescription *)commandDef;
                                  // Accessor Methods
   - (void)setReceiversSpecifier:(NSScriptObjectSpecifier *)receiversRef;
   - (NSScriptObjectSpecifier *)receiversSpecifier;
   - (void)setDirectParameter:(id)directParameter;
   - (id)directParameter;
   - (void)setScriptErrorNumber:(int)num;
   - (int)scriptErrorNumber;
   - (void)setScriptErrorString:(NSString *)str;
   - (NSString *)scriptErrorString;
   - (void)setArguments:(NSDictionary *)args;
   - (NSDictionary *)arguments;
                                  // Instance Methods
   - (NSScriptCommandDescription *)commandDescription;
   - (NSDictionary *)evaluatedArguments;
   - (id)evaluatedReceivers;
   - (id)executeCommand;
   - (BOOL)isWellFormed;
   - (id)performDefaultImplementation;
                                  // Methods Implementing NSCoding
   - (void)encodeWithCoder:(NSCoder *)aCoder;
   - (id)initWithCoder:(NSCoder *)aDecoder;

Subclasses

NSCloneCommand, NSCloseCommand, NSCountCommand, NSCreateCommand, NSDeleteCommand, NSExistsCommand ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required