re: Frustrated novice wants to paste the clipboard
re: Frustrated novice wants to paste the clipboard
- Subject: re: Frustrated novice wants to paste the clipboard
- From: Charles Arthur <email@hidden>
- Date: Thu, 20 Nov 2003 17:44:18 +0000
On Thu, 20 Nov 2003 08:40:05 -0500 David Hoerl <email@hidden> wrote:
>
Sigh. What is more troubling than not being able to figure out how to
>
do something is that I cannot figure out the PROCESS of learning how
>
to do what seem to be simple things with AppleScript. I have the
>
O'Reilly book, and the Intro on AppleScript, and I've opened the
>
Standard Editions dictionary and the application dictionary.
>
>
What I am trying to accomplish is to paste the clipboard "as plain
>
text" into the foremost window of Eudora. This application does not
>
let you record actions so I cannot use the RECORD feature to help me
>
out here. [Guess I could try some other application to do this, but
>
its not knowing HOW to find this out which is most frustrating.]
Eudora is pretty frustrating to script. (John Delacour apparently not being
around, I think I'll only hear "ayes" to that.) It's not like scripting
Mail (though that has its bamboozlements), and it tends to be easier to
script stuff to messages, not windows, unlike many other apps.
Generally (always? yes, I think so) the frontmost window in Eudora is
easiest referred to as "message 0". Once you know this, and a trick that's
revealed in the script below, much becomes easier. I've got a lot of little
scripts for Eudora which I trigger with Youpi Key on one machine and
Keyboard Maestro on another. (I think KM has the edge, because you point to
a script rather than entering it. But that's another argument.)
The body of the message is, well, called the body. (See the dictionary for
"message".)
This works:
tell application "Eudora"
make new message at end of mailbox "Out" --this will also generate
a reference
(* you could have "set newmsj to make new message at end of mailbox
"Out" " and then later manipulate newmsj, in case other messages came in
and popped up in front of the one you wanted to work on *)
set thistext to the clipboard
set body of message 0 to thistext as text
--obviously it would then be "set body of message newmsj [ or it
might be just newmsj - you test] to thistext...
end tell
(tested on 10.3 with Eudora 5.2).
Eudora is like plasticine - it becomes more malleable with handling.
best
Charles
--
----------------------------
http://www.ukclimbing.com : 1100+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. And there's even a cool shop attached.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.