Ron,
I will re-send this. When I originally sent this code, I think there
was discussion of you using an older FB.
If you have the current FB compiler from STAZ, then this code does
exactly what you are asking:
1. Gather the information
2. Open mail (Apple's Mail.app)
3. Address the message
4. Add the Subject
5. Add the body
6. You have to click the send button.
I am changing to Courier because I need to format some information.
You may not want to do that.
<working code sent June 17, 2005, except I removed "studentID" from the
FN>
Ron,
If you are using fb for OS X, you can do this using an AppleScript.
Here is one of mine that uses Mail. That seems to be the problem.
There are scripts available for Mail and Outlook Express. I am not
sure where to find others.
Assuming you can get the message into a string or probably do to length
a Container, here is a script that should get you started. I am
getting the message from a edit field (_ScratchPlace).
Hope this helps.
INCLUDE "Subs AppleScript.Incl"
local fn QuickMailEMail$
'~'1
dim as OSErr err
dim as str255 result
dim fontstring$, recipient$,Subject$,Sender$,Name$
name$="gbeckman@..."
recipient$="gbeckman@..."
subject$="Subject of Message"
message$$=edit$(_ScratchPlace)
sender$="George Beckman"
ROUTE _toAppleScript
print "set theName to """ + name$ + """
print "set theAddress to """ + recipient$ + """
print "set theSubject to """ + subject$ + """
fontString$="Courier"
'message$$=edit$(theField&)
print "set theBody to """;
print + message$$ + """
print "set theSender to """ + sender$ + """
print "tell application ""Mail.app"""
'print "GetURL(""mailto:gbeckman@..."")"
'print "open location ""mailto:gbeckman@..."""
print "set newMessage to make new «class bcke» with properties {«class
subj»:theSubject, «class ctnt»:theBody & return & return}"
print "tell newMessage"
print "set visible to true" //set to false to hide Mail.app window
print "set font to ""Courier""
print "make new «class trcp» at end of every «class trcp» with
properties {name:theName, «class radd»:theAddress}"
print "end tell"
print "activate"
//print "send newMessage"
//print "quit application ""Mail"" saving yes"
print "end tell"
route _toScreen
err = usr AppleScriptRun( result )
if (err != _noErr) then result = str$( err )
end fn = result
On Jul 1, 2005, at 2:02 PM, Ronald Anderson wrote:
> I do have my QSL card program working to the point where it is usable
> and have send a number of electronic QSL cars out but the process is
> somewhat tedious.
>
> I have to create the card on my program and then copy the final
> version of it with a Command Shift 4. Then I have to open up my mail
> program and send an E-mail with the image attached.
>
> Is there a way to generate the E-mail message right in my program and
> thus eliminate one or two steps? I know there is a way to do it in a
> web page but don't think that will work here.
>
> I am using the E-Mail program supplied by Apple in version 10.3.8
>
> --
>
>
----
Best Wishes,
George
http://www.pggp.com