I need to be able to send text from the clipboard to an application I'm writing (in Objective-C) via AppleScript. Obviously I need to make my application scriptable (I'm currently reading the Apple Docs about this) but is this possible/easy-to-implement?
A:
If you need your app to retrieve data from the clipboard, you should use the NSPasteboard
class.
Why do you think you need to use AppleScript?
Dave DeLong
2010-05-18 16:20:21
I am trying to implement voice control for my app. I say a command word that is recognised by MacSpeech Dictate. This command launches a small app (app 1) that simply has a text field in it. I then speak the text I want sent to app 2. When I say the command "execute", I want MacSpeech to cut the text in app 1's text field and send it to an NSString object in app 2.
Garry
2010-05-18 18:31:43
The reason I don't speak directly into app 2 is because app 2 doesn't have any form of GUI.
Garry
2010-05-18 18:32:48
+2
A:
On the AppleScript side you can use the command set the clipboard to
to put data on the clipboard. See the AppleScript Language Guide.
sakra
2010-05-18 17:02:47