Re: AppleScript little problem...
Re: AppleScript little problem...
- Subject: Re: AppleScript little problem...
- From: Nico <email@hidden>
- Date: Tue, 17 Dec 2002 06:57:19 +0100
OK Thanks compilation is now ok, but i still got the
NSCannotCreateScriptCommandError..
Here's the suite and terminology :
[...]
<key>Commands</key>
<dict>
<key>TypeIn</key>
<dict>
<key>AppleEventCode</key>
<string>Rvrs</string>
<key>Arguments</key>
<dict>
<key>myText</key>
<dict>
<key>AppleEventCode</key>
<string>Strn</string>
<key>Optional</key>
<string>NO</string>
<key>Type</key>
<string>NSString</string>
</dict>
</dict>
<key>CommandClass</key>
<string>AKTypeInCommand</string>
<key>ResultAppleEventCode</key>
<string>Strn</string>
<key>Type</key>
<string>NSString</string>
</dict>
</dict>
[...]
------------------
[...]
<key>Commands</key>
<dict>
<key>TypeIn</key>
<dict>
<key>Arguments</key>
<dict>
<key>myText</key>
<dict>
<key>Description</key>
<string>The string to send.</string>
<key>Name</key>
<string>myText</string>
</dict>
</dict>
<key>Description</key>
<string>Send some text to the current window.</string>
<key>Name</key>
<string>typein</string>
</dict>
</dict>
[...]
The NSScriptCommand subclass (which never gets called)
#import <Cocoa/Cocoa.h>
@interface AKTypeInCommand : NSScriptCommand
{
}
- (id)performDefaultImplementation;
@end
#import "AKTypeInCommand.h"
@implementation AKTypeInCommand
- (id)performDefaultImplementation
{
NSString *string = [self directParameter];
NSLog (@"%@", string);
// do whatever you'd like with the string...
return nil;
}
@end
Any ideas ?
Nico.
On mardi, dic 17, 2002, at 06:25 Europe/Paris, David Remahl wrote:
Substitute directObject for directParameter.
/ Regards, David
On Tuesday, December 17, 2002, at 06:11 AM, Nico wrote:
Hi :)
Thanks for your answer !
I tried what you said and I've got a warning : "TypeInCommand does not
respond to 'directObject'.
?
Nico.
_______________________________________________
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.
_______________________________________________
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.