FROM : Rakesh Pandey
DATE : Mon Dec 16 20:43:28 2002
Here is part of code from my application:
- (id) handleGetURLCommand:(NSScriptCommand*)command
{
id directParam = [command directParameter];
if (directParam)
{
[self handleURL:(NSString*)directParam];
}
return nil;
}
Regards
Rakesh
On 17/12/02 12:50 AM, "Nico" <<email_removed>> wrote:
> Hi !
>
> I partially made my app scriptable. Let me explain : you can type the
> "typein" command in script editor, but you can't add an argument.
> I've seen numerous examples, but still no luck.
>
> Here are the .scriptSuite, .scriptTerminology and the NSApplication
> category i use.
> Can you tell me if it's possible just to pass an argument so that the
> user can use
> tell application "MyApp" too typein "boo"
>
> Any help is *very* appreciated :-)
> Thanks in advance.
> Nico
> ---
>
>
>
>
>
> .scriptSuite
> <plist version="1.0">
> <dict>
> <key>AppleEventCode</key>
> <string>AKWA</string>
> <key>Classes</key>
> <dict>
> <key>NSApplication</key>
> <dict>
> <key>AppleEventCode</key>
> <string>capp</string>
> <key>Superclass</key>
> <string>NSCoreSuite.NSApplication</string>
> <key>SupportedCommands</key>
> <dict>
> <key>TypeIn</key>
> <string>handleSendCommand:</string>
> </dict>
> <key>ToManyRelationships</key>
> <dict>
> <key>orderedDocuments</key>
> <dict>
> <key>AppleEventCode</key>
> <string>docu</string>
> <key>Type</key>
> <string>AKDocument</string>
> </dict>
> </dict>
> </dict>
> </dict>
> <key>Commands</key>
> <dict>
> <key>TypeIn</key>
> <dict>
> <key>AppleEventClassCode</key>
> <string>AKWA</string>
> <key>AppleEventCode</key>
> <string>Rvrs</string>
> <key>Arguments</key>
> <dict>
> <key>text</key>
> <dict>
> <key>AppleEventCode</key>
> <string>Strn</string>
> <key>Optional</key>
> <string>NO</string>
> <key>Type</key>
> <string>NSObject</string>
> </dict>
> </dict>
> <key>CommandClass</key>
> <string>NSScriptCommand</string>
> <key>ResultAppleEventCode</key>
> <string>Strn</string>
> <key>Type</key>
> <string>NSString</string>
> </dict>
> </dict>
> <key>Name</key>
> <string>MyApp</string>
> <key>Synonyms</key>
> <dict>
> <key>tact</key>
> <string>NSTextSuite.NSTextStorage</string>
> </dict>
> </dict>
>
>
>
>
> .scriptTerminology
> <dict>
> <key>Classes</key>
> <dict>
> <key>NSApplication</key>
> <dict>
> <key>Description</key>
> <string>AkwaIRC's top level scripting object.</string>
> <key>Name</key>
> <string>application</string>
> <key>PluralName</key>
> <string>applications</string>
> </dict>
> </dict>
> <key>Commands</key>
> <dict>
> <key>TypeIn</key>
> <dict>
> <key>Arguments</key>
> <dict>
> <key>text</key>
> <dict>
> <key>AppleEventCode</key>
> <string>Strn</string>
> <key>Type</key>
> <string>NSObject</string>
> <key>Description</key>
> <string>fuka string</string>
> <key>Name</key>
> <string>text</string>
> </dict>
> </dict>
> <key>Description</key>
> <string>Send some text to the current window.</string>
> <key>Name</key>
> <string>typein</string>
> </dict>
> </dict>
> <key>Description</key>
> <string>AkwaIRC specific classes.</string>
> <key>Name</key>
> <string>AkwaIRC suite</string>
> <key>Synonyms</key>
> <dict>
> <key>tact</key>
> <dict>
> <key>Description</key>
> <string>The textual contents of a text area graphic.</string>
> <key>Name</key>
> <string>text contents</string>
> </dict>
> </dict>
> </dict>
>
>
>
>
> and the category :-)
> @interface NSApplication (AKScripting)
> - (id)handleSendCommand:(NSScriptCommand *)command;
> @end
>
> @implementation NSApplication(MyAppScripting)
> - (id)handleSendCommand:(NSScriptCommand *)command
> {
> // do some stuff
> }
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> 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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Mon Dec 16 20:43:28 2002
Here is part of code from my application:
- (id) handleGetURLCommand:(NSScriptCommand*)command
{
id directParam = [command directParameter];
if (directParam)
{
[self handleURL:(NSString*)directParam];
}
return nil;
}
Regards
Rakesh
On 17/12/02 12:50 AM, "Nico" <<email_removed>> wrote:
> Hi !
>
> I partially made my app scriptable. Let me explain : you can type the
> "typein" command in script editor, but you can't add an argument.
> I've seen numerous examples, but still no luck.
>
> Here are the .scriptSuite, .scriptTerminology and the NSApplication
> category i use.
> Can you tell me if it's possible just to pass an argument so that the
> user can use
> tell application "MyApp" too typein "boo"
>
> Any help is *very* appreciated :-)
> Thanks in advance.
> Nico
> ---
>
>
>
>
>
> .scriptSuite
> <plist version="1.0">
> <dict>
> <key>AppleEventCode</key>
> <string>AKWA</string>
> <key>Classes</key>
> <dict>
> <key>NSApplication</key>
> <dict>
> <key>AppleEventCode</key>
> <string>capp</string>
> <key>Superclass</key>
> <string>NSCoreSuite.NSApplication</string>
> <key>SupportedCommands</key>
> <dict>
> <key>TypeIn</key>
> <string>handleSendCommand:</string>
> </dict>
> <key>ToManyRelationships</key>
> <dict>
> <key>orderedDocuments</key>
> <dict>
> <key>AppleEventCode</key>
> <string>docu</string>
> <key>Type</key>
> <string>AKDocument</string>
> </dict>
> </dict>
> </dict>
> </dict>
> <key>Commands</key>
> <dict>
> <key>TypeIn</key>
> <dict>
> <key>AppleEventClassCode</key>
> <string>AKWA</string>
> <key>AppleEventCode</key>
> <string>Rvrs</string>
> <key>Arguments</key>
> <dict>
> <key>text</key>
> <dict>
> <key>AppleEventCode</key>
> <string>Strn</string>
> <key>Optional</key>
> <string>NO</string>
> <key>Type</key>
> <string>NSObject</string>
> </dict>
> </dict>
> <key>CommandClass</key>
> <string>NSScriptCommand</string>
> <key>ResultAppleEventCode</key>
> <string>Strn</string>
> <key>Type</key>
> <string>NSString</string>
> </dict>
> </dict>
> <key>Name</key>
> <string>MyApp</string>
> <key>Synonyms</key>
> <dict>
> <key>tact</key>
> <string>NSTextSuite.NSTextStorage</string>
> </dict>
> </dict>
>
>
>
>
> .scriptTerminology
> <dict>
> <key>Classes</key>
> <dict>
> <key>NSApplication</key>
> <dict>
> <key>Description</key>
> <string>AkwaIRC's top level scripting object.</string>
> <key>Name</key>
> <string>application</string>
> <key>PluralName</key>
> <string>applications</string>
> </dict>
> </dict>
> <key>Commands</key>
> <dict>
> <key>TypeIn</key>
> <dict>
> <key>Arguments</key>
> <dict>
> <key>text</key>
> <dict>
> <key>AppleEventCode</key>
> <string>Strn</string>
> <key>Type</key>
> <string>NSObject</string>
> <key>Description</key>
> <string>fuka string</string>
> <key>Name</key>
> <string>text</string>
> </dict>
> </dict>
> <key>Description</key>
> <string>Send some text to the current window.</string>
> <key>Name</key>
> <string>typein</string>
> </dict>
> </dict>
> <key>Description</key>
> <string>AkwaIRC specific classes.</string>
> <key>Name</key>
> <string>AkwaIRC suite</string>
> <key>Synonyms</key>
> <dict>
> <key>tact</key>
> <dict>
> <key>Description</key>
> <string>The textual contents of a text area graphic.</string>
> <key>Name</key>
> <string>text contents</string>
> </dict>
> </dict>
> </dict>
>
>
>
>
> and the category :-)
> @interface NSApplication (AKScripting)
> - (id)handleSendCommand:(NSScriptCommand *)command;
> @end
>
> @implementation NSApplication(MyAppScripting)
> - (id)handleSendCommand:(NSScriptCommand *)command
> {
> // do some stuff
> }
> _______________________________________________
> cocoa-dev mailing list | <email_removed>
> 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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Nico | Dec 16, 20:20 | |
| Rakesh Pandey | Dec 16, 20:42 | |
| Rakesh Pandey | Dec 16, 20:43 | |
| Glenn Howes | Dec 16, 20:44 | |
| Nico | Dec 16, 21:38 | |
| Greg Titus | Dec 17, 01:05 | |
| Nico | Dec 17, 06:11 | |
| David Remahl | Dec 17, 06:25 | |
| Nico | Dec 17, 06:57 |






Cocoa mail archive

