Re: LC, applescript and mail.app
Hi Yves, According to the Mail applescript's dictionary, the content property only accepts RTF content. 2 ways for doing what you want: 1. RTF put the rtfText of fld test to tVar tell application Mail set newMessage to (make new outgoing message at end of outgoing messages with properties {subject:xx, content:tVar}) end tell 2. Or with applescript, using the HTML content property of the outgoing message set the htmlText of fld test to tVar tell application Mail set newMessage to (make new outgoing message at end of outgoing messages with properties {subject:xx, html content:tVar}) end tell Best Regards, On Wed, Aug 14, 2013 at 8:15 AM, Yves COPPE yvesco...@skynet.be wrote: Hi list, For mac users I have a text formatted with html tags in a variable tVar when I write set the htmlText of fld test to tVar : OK when I write an applescript to send the text per mail tell application Mail set newMessage to (make new outgoing message at end of outgoing messages with properties {subject:xx, content:tVar) end tell the text appears in the mail but with the tags bthe text/b ……, not in the formatted style How can I resolve this ? Thanks. Greetings. Yves COPPE yvesco...@skynet.be ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: LC, applescript and mail.app
Hi Yves, I had this problem too. I noticed that Mail automatically converts any diacritics to HTML to make sure that they are read correctly on PC's. Just use standard MacRoman and all will be fine. However, I would be very interested in knowing whether Zryip's solution works for you. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com Buy my new book Programming LiveCode for the Real Beginner http://qery.us/3fi Fill out this survey please http://livecodebeginner.economy-x-talk.com/survey/ On 8/14/2013 08:15, Yves COPPE wrote: Hi list, For mac users I have a text formatted with html tags in a variable tVar when I write set the htmlText of fld test to tVar : OK when I write an applescript to send the text per mail tell application Mail set newMessage to (make new outgoing message at end of outgoing messages with properties {subject:xx, content:tVar) end tell the text appears in the mail but with the tags bthe text/b ……, not in the formatted style How can I resolve this ? Thanks. Greetings. Yves COPPE yvesco...@skynet.be ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: LC, applescript and mail.app
Hi, thanks for the good idea; the text appears without html flags but … as plain text, not formatted, without returns, bold text, … no any other idea ? Le 14 août 2013 à 10:15, Mark Schonewille m.schonewi...@economy-x-talk.com a écrit : Hi Yves, I had this problem too. I noticed that Mail automatically converts any diacritics to HTML to make sure that they are read correctly on PC's. Just use standard MacRoman and all will be fine. However, I would be very interested in knowing whether Zryip's solution works for you. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com Buy my new book Programming LiveCode for the Real Beginner http://qery.us/3fi Fill out this survey please http://livecodebeginner.economy-x-talk.com/survey/ On 8/14/2013 08:15, Yves COPPE wrote: Hi list, For mac users I have a text formatted with html tags in a variable tVar when I write set the htmlText of fld test to tVar : OK when I write an applescript to send the text per mail tell application Mail set newMessage to (make new outgoing message at end of outgoing messages with properties {subject:xx, content:tVar) end tell the text appears in the mail but with the tags bthe text/b ……, not in the formatted style How can I resolve this ? Thanks. Greetings. Yves COPPE yvesco...@skynet.be ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Amicalement. Yves COPPE yvesco...@skynet.be ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: LC, applescript and mail.app
Hi I did another test set the clipboardData[HTML] to tVar and then, I paste myself the text in a mail.app message and I get a good formatted text. Is it possible to do the same via applescript (to avoid having to do it manually) Le 14 août 2013 à 10:30, Yves COPPE yvesco...@skynet.be a écrit : Hi, thanks for the good idea; the text appears without html flags but … as plain text, not formatted, without returns, bold text, … no any other idea ? Le 14 août 2013 à 10:15, Mark Schonewille m.schonewi...@economy-x-talk.com a écrit : Hi Yves, I had this problem too. I noticed that Mail automatically converts any diacritics to HTML to make sure that they are read correctly on PC's. Just use standard MacRoman and all will be fine. However, I would be very interested in knowing whether Zryip's solution works for you. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com Buy my new book Programming LiveCode for the Real Beginner http://qery.us/3fi Fill out this survey please http://livecodebeginner.economy-x-talk.com/survey/ On 8/14/2013 08:15, Yves COPPE wrote: Hi list, For mac users I have a text formatted with html tags in a variable tVar when I write set the htmlText of fld test to tVar : OK when I write an applescript to send the text per mail tell application Mail set newMessage to (make new outgoing message at end of outgoing messages with properties {subject:xx, content:tVar) end tell the text appears in the mail but with the tags bthe text/b ……, not in the formatted style How can I resolve this ? Thanks. Greetings. Yves COPPE yvesco...@skynet.be ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Amicalement. Yves COPPE yvesco...@skynet.be ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Amicalement. Yves COPPE yvesco...@skynet.be ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: LC, applescript and mail.app
Hi Yves, This is the short version of the AppleScript I use: set mailText to set thisSubject to Test E-Mail set thisEmail to t...@test.xyz using terms from application Mail tell application Mail set theAccount to Name of Your Mail Account set theNewMessage to make new outgoing message with properties {account:theAccount, subject:thisSubject, content:mailText, visible:false} tell theNewMessage make new to recipient at end with properties {address:thisEmail} set sender to Your Name y...@domain.xyzs end tell send theNewMessage end tell end using terms from and this is a LiveCode script, assuming that the AppleScript is in a field (normally I'd use a property) and the body text is also in a field: on mouseUp put fld AppleScript into myAppleScript put fld Body Text into myBodyText replace quote with backslash quote in myBodyText replace cr with backslash n in myBodyText replace with myBodyText in myAppleScript do myAppleScript as AppleScript put the result into rslt if rslt is not empty then beep answer error rslt end if end mouseUp Careful: if you run this script, it *will* send an e-mail. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com We have time for new software development projects. Contact me for a quote. On 14 aug 2013, at 10:30, Yves COPPE wrote: Hi, thanks for the good idea; the text appears without html flags but … as plain text, not formatted, without returns, bold text, … no any other idea ? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: LC, applescript and mail.app
Hi Yves, keystroke v using command down will paste the text and keystroke tab will move the text insertion point to the next field or text area. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com Buy my new book Programming LiveCode for the Real Beginner http://qery.us/3fi Fill out this survey please http://livecodebeginner.economy-x-talk.com/survey/ On 8/14/2013 11:03, Yves COPPE wrote: Hi I did another test set the clipboardData[HTML] to tVar and then, I paste myself the text in a mail.app message and I get a good formatted text. Is it possible to do the same via applescript (to avoid having to do it manually) ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode