Executing AppleScript from Cocoa (with return values)
Executing AppleScript from Cocoa (with return values)
- Subject: Executing AppleScript from Cocoa (with return values)
- From: Evan DiBiase <email@hidden>
- Date: Sun, 17 Aug 2003 21:31:46 -0400
Hello!
I'm attempting to cull subscription information from NetNewsWire
(
http://www.ranchero.com/) for use in a Cocoa application. The only way
to get information about which subscriptions one is subscribed to
appears to be to utilize the application's rather nice AppleScript
dictionary. The AppleScript I've generated to express a little bit of
what I'd like is:
tell application "NetNewsWire"
set subList to {}
repeat with thisSub in subscriptions
if synthetic of thisSub is false then
copy display name of thisSub to end of subList
end if
end repeat
return subList
end tell
Now, given that script (or some variant), I'd like to run the script
and access to the return value in my Cocoa application (as an NSArray,
for example). If anyone can provide some sample code or pointers to
good documentation that will take me end-to-end (or pretty close), I'd
be quite grateful.
Thanks,
Evan
_______________________________________________
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.