• 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
Re: [TRTFM] Cocoa and AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRTFM] Cocoa and AppleScript


  • Subject: Re: [TRTFM] Cocoa and AppleScript
  • From: Ian_atkinson <email@hidden>
  • Date: Tue, 13 Aug 2002 11:56:22 -0000

NSURL *url=[NSURL
URLWithString:@"mailto:email@hidden?subject=the subject";]
;
[[NSWorkspace sharedWorkspace] openURL:url];

this is from memory... i think to add some text to the body you'll have to
change the url string to
@"mailto:email@hidden?subject=the subject?body=the text you want to­d";
but from memory i'm not sure. maybe someone from the list could confirm this
to be correct or not :)

ian

>On Tuesday, August 13, 2002, at 11:55 AM, Jeremy Dronfield wrote:
>
>I'd like to include an AppleScript in my Cocoa app, but can't make head or
>tail of the numerous NSScriptXXX classes in Foundation. Also, I'm confused
>by the AS component in Interface Builder. Is it only meant to be used for
>building AS applications? I managed to get it to attach a script to a
>button's action, but at runtime I got an ASKNibInfoManager error: "class
>not loaded". Would it be better to simply call the script from within the
>button's action method in PB? If so, how?
>
>The purpose of the script is (or will be) to find the user's default email
>application (if that's possible), launch it, begin a new message and put
>some strings in the subject field and the text field.
>
>If there's a way to do all this that bypasses AppleScript altogether, I'd
>love to hear about it. I mean, I can launch Mail with NSWorkspace, but
>that's not really enough. BTW, I don't have Jaguar, hence no
>NSAppleScript.
>
>Hoping somebody can help.
>-Jeremy
______________________________________________
This email was sent online by
macunlimited.net
The UK's mac dedicated service provider
_______________________________________________
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: [TRTFM] Cocoa and AppleScript
      • From: Jeremy Dronfield <email@hidden>
  • Prev by Date: Re: [newbie]: UI questions (using NSSlider & NSTextField with delegation)
  • Next by Date: Re: [TRTFM] Cocoa and AppleScript
  • Previous by thread: Re: Documents which aren't NSDocuments
  • Next by thread: Re: [TRTFM] Cocoa and AppleScript
  • Index(es):
    • Date
    • Thread