Re: Getting a string on the clipboard in OE
Re: Getting a string on the clipboard in OE
- Subject: Re: Getting a string on the clipboard in OE
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 28 Apr 2001 04:30:34 -0700
On 4/28/01 4:08 AM, "Jan Pieter Kunst" <email@hidden> wrote:
>
Rob Jorgensen (email@hidden) schreef op 28-04-2001 11:49 :
>
>
> On 4/28/01, Jan Pieter Kunst commented:
>
>
>> I managed to script Outlook Express to get the source of the selected
>
>> message in a variable. Now I want to "copy" this string to the clipboard and
>
>> switch to another application, and then paste (Command-V) the string by
>
>> hand.
>
>
>
> Depending on the version of AppleScript in use, this might work:
>
>
>
> set the clipboard to x -- doesn't require a tell statement
>
> tell application "whatever" to activate
>
>
It's version 1.5.5, the version that comes with MacOS 9.1.
>
>
"set the clipboard to x" doesn't work: it gives an error dialog box that
>
says more or less (translating from the Dutch): "Outlook Express received an
>
error: certain data could not be read".
>
>
In both BBEdit and the Finder, there is a verb (that's the correct term,
>
right?) "copy" that copies something to the clipboard. I couldn't find
>
"copy" in the Outlook Express dictionary, so if "copy" is a standard way to
>
get something on the clipboard, then maybe it's just not possible in OE.
>
There's a tremendous lot of confusion here. 'copy' is completely the wrong
word for the clipboard,
set the clipboard to x
is one of the Standard Additions, which will work just about anywhere. The
reason it's not working for you is that there's a bug with AppleScript 1.5.5
that requires you to have all the Security extensions enabled for any of the
Standard Additions to work. You evidently have removed some of the Security
modules. So either put them back, or , better, upgrade to AppleScript 1.6.
You can do that easily by running Software Update control panel. Or you can
download it from the Apple website.
You keep saying 'another application'. Presumably it's not scriptable? If it
is, why use the clipboard ? It would be better just to use the variable as a
string. What's the application? And are you certain you need the entire
source from Outlook Express? There are lots and lots of ways to get just
what you might need from OE, if you don't really need the entire source.
--
Paul Berkowitz