Reputation: 12043
In my scriptable Mac app, I like to make the following syntax possible:
set preference with key <a key> to <a value>
Is that possible? How would I specify this in the Sdef?
The only way I can so far come up with is to define a command with the name set preference with key
, but Apple's Scripting Interface Guidelines says that one should not begin a command with a reserved name such as set
is here. Is there any other way? Or is it safe to use my idea in this case?
Currently, I avoid this by instead using this, but I don't like that syntax as much as I'd like the more common "set" terminology:
write preference with key <a key> value <a value>
Better suggestions are welcome.
Upvotes: 1
Views: 262