Starting out with adding Applescript support to my Cocoa app (basic question about the best script interface)
Starting out with adding Applescript support to my Cocoa app (basic question about the best script interface)
- Subject: Starting out with adding Applescript support to my Cocoa app (basic question about the best script interface)
- From: Adam Holt <email@hidden>
- Date: Fri, 22 Jul 2005 16:09:29 +0100
I've been playing for a little while with trying to get Applescriptability
into my existing Cocoa app.
So far, I've found the experience quite frustrating despite reading numerous
threads, Apple docs, and online comments on the subject.
I'm rewinding my efforts back to the beginning however, and my question is
actually a fundamental one to do with the best approach to take for the
interface...
The only thing I wish to make scriptable in my app is the ability to set two
text parameters and say "go" (the application's main task in life is to send
a message over HTTP, so one parameter is the address and the other parameter
the message body).
There is never any need to be able to read these parameters from Applescript
and nor does it make sense to be able to set them without telling the app at
the same time to perform message sending function.
Based on this, would your approach be:
1. To support two parameters and catch a standard Applescript command, e.g.
RUN, so from script I would call it like:
tell application "MyApp"
set address to "192.168.123.1:4444"
set message to "This is the message"
run
end tell
OR
2. Create a new command with two parameters, so from script I would call it
like:
tell application "MyApp"
sendmsg to "192.168.123.1:4444" message "This is the message"
end tell
Ideas welcome please!
Thanks,
Adam.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden