I don't know why, Paul, but the simple script you give:

> tell application "Microsoft Entourage"
>   activate
>   set the clipboard to source of (item 1 of (get current messages))
> end tell

 does not seem to work in OS X...if I run it, switch to BBEdit, and paste, I
get nothing. As you say, "Entourage
 itself, TextEdit, Tex-Edit Plus, couldn't then transcribe the contents of
 what was in 'the clipboard', at least not by script."

However, this <does> work:

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.
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.
-- 
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/>

> From: Paul Berkowitz <[EMAIL PROTECTED]>
> Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]>
> Date: Sun, 30 Dec 2001 23:06:49 -0800
> To: Entourage Mac Talk <[EMAIL PROTECTED]>
> Subject: Re: Message source to clipboard script
> 
> On 12/30/01 10:52 PM, "Dan Frakes" <[EMAIL PROTECTED]> wrote:
> 
>> Some time ago, someone (I think it was Paul or Allen) provided a script that
>> supposedly pasted the source of a message to the clipboard (entire source,
>> including headers). I copied it as:
>> 
>> tell application "Microsoft Entourage"
>>   set the clipboard to source of (item 1 of current messages)
>> end tell
>> 
>> However, this script doesn't work for me. I'm not a script guru, so I have
>> no idea why not ;) Any suggestions?
> 
> I think it must have been Allen - I never use the clipboard, but use a
> variable instead. More about that below. I see you're in Entourage 2001, so
> this might work if you do the following alteration:
> 
> tell application "Microsoft Entourage"
>   activate
>   set the clipboard to source of (item 1 of (get current messages))
> end tell
> 
> 
> It needs the 'get' to work.
> 
> Presumably you're running this from the Entourage script menu so Entourage
> will already be 'activated' anyway (in front), so 'activate' may not be
> absolutely necessary, but you're always supposed to use it with 'set the
> clipboard'.
> 
> Just this morning, I was trying out 'the clipboard' as a possible way of
> getting styled text from selected text in open HTML messages, as perhaps the
> only way to do it, for the person wanting styled text passed to FileMaker.
> (In applescript, if you set a regular variable to the text you'll just get
> plain text.) But I was finding that in OS X, any app I tried - Entourage
> itself, TextEdit, Tex-Edit Plus, couldn't then transcribe the contents of
> what was in 'the clipboard', at least not by script. You _should_ be OK in
> OS 8/9.
> 
> -- 
> Paul Berkowitz
> 
> 
> -- 
> 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/>


-- 
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