• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Executing AppleScript from Cocoa (with return values)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Executing AppleScript from Cocoa (with return values)
      • From: "Alastair J.Houghton" <email@hidden>
    • Re: Executing AppleScript from Cocoa (with return values)
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Re: Change An NSFont's 'Leading'
  • Next by Date: Re: Single-User Database
  • Previous by thread: Re: Change An NSFont's 'Leading'
  • Next by thread: Re: Executing AppleScript from Cocoa (with return values)
  • Index(es):
    • Date
    • Thread