On or near 12/31/01 1:11 AM, Paul Berkowitz at [EMAIL PROTECTED] observed:

> On 12/31/01 12:37 AM, "Allen Watson" <[EMAIL PROTECTED]> wrote:
> 
>> tell application "Microsoft Entourage"
>>   activate
>>   set x to source of (item 1 of (get current messages))
>>   set the clipboard to x
>> end tell
>> 
>> I can't explain why that should work, but I've found that it does.
> 
> Same thing as the preceding error, but I didn't test for source. This
> property too needs to be evaluated by setting a variable to it (as you just
> did) or by using the explicit 'get'. This will also work:
> 
> tell application "Microsoft Entourage"
>   activate
>   set the clipboard to (get source of (item 1 of (get current messages)))
> end tell
> 
Ah! Okay, that makes a certain kind of sense, although it surely isn't
"natural language" in style, is it?
> 
>> Incidentally, I was also trying to use the clipboard to pass styled text,
>> and like you, found that I could not do anything like "set the clipboard to
>> contents of theMsg". And if you pass the data through an AppleScript
>> variable, you lose the styling. CopyPaste, alas, is not scriptable. So, I
>> don't see any way, currently, to use a script to preserve styled text and
>> copy it to FMP, although you can use the clipboard <manually> to do so.
> 
> Yes, it's because it depends on the Entourage implementation of 'selection'
> in the Standard Suite, which can only be string, list or folder. In text
> applications, 'selection' is usually defined as styled text, and both the
> actual clipboard  as well as the osax 'set the clipboard' can handle styled
> text just fine. It's the Entourage version of the class 'selection' that's
> letting things down here.

But what about using "content" instead of a selection, where you want the
entire message? Is "content" also restricted to string? It appears to be, to
either string or Unicode text.
> 
> Dan has said several times that he's not keen to implement the Text Suite,
> and seems equally reluctant to access styled text or HTML. But by getting
> the source, parsing it for just the HTML part, and putting that into a text
> editor that can do HTML (BBEdit, probably?), then selecting the resulting
> HTML as styled text, you could, I think, finally get the styled text. I'll
> give it a try soon, except that BBEdit Lite doesn't have AppleScript - you
> need the $60 full version. I think you can get a 30-day demo however. And
> there may well be some other text editor which can do HTML as well. (Who
> knows, maybe even Word, but not via thos route, I don't think.)
> 
I'm not sure there is anything that will do what we're talking about. I have
the full BBEdit. It parses HTML, but it does not <apply> the formatting
codes; it just color-codes them. The display is mono-faced and mono-sized,
although you can pick any font and size. But everything is the same font and
size, and the coloring is only applied to HTML tags, not to the actual text.

Tex-Edit Plus displays different fonts and sizes, but it does not recognize
HTML codes. It needs to be something that does HTML rendering, like
Entourage does. Why wouldn't Word work, since it does render HTML? I think
you'd have to write the HTML part out to a file, give it an extension of
".html", and then open the file with Word, copy the results, and finally
paste that into FileMaker. What a kludge! Way more trouble than it is worth,
in my opinion, and not something that any reasonable person would put up
with on a frequent basis.

Maybe we can persuade the CopyPaste author or authors to make their app
scriptable? Either that, or persuade Dan to implement "Cut" and "Paste"
commands within Entourage.

Or, since CopyPaste <can> be driven by keyboard shortcuts, if we can get one
of the osaxen that simulate typing working in OS X, we might be able to do
it that way, by emulating the right keystrokes. But we had a problem in OS 9
with that...or no, that was the Akua menu-manipulation command, wasn't it,
that had to be the last thing the script did because of some Entourage
quirk?
-- 
Microsoft MVP for Entourage/OE/Word
Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson
Applescripts for Outlook Express and Entourage:
<http://homepage.mac.com/allenwatson/>


-- 
To unsubscribe:                     
<mailto:[EMAIL PROTECTED]>
archives:       
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:       
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to