Re: Eudora weirdness when failing to set a var to selected text
Re: Eudora weirdness when failing to set a var to selected text
- Subject: Re: Eudora weirdness when failing to set a var to selected text
- From: email@hidden
- Date: Thu, 25 Oct 2001 01:54:36 -0500
At 21:52 +0200 10/24/01, Frank Watzl wrote:
>
Eudora experts,
>
>
when I run this in Eudora with no messages or other windows open, the error handler will not be executed. The last line however will throw error -2753, although in the first line s is initialized. any ideas?
__________________________________________________________________________
Hey Frank,
I'd probably do it this way:
---------------------------------------------------------------------------
set sel to ""
tell application "Eudora"
if exists of front message then
try
set sel to selected text of front window
end try
end if
end tell
if (count of characters of sel) is greater than 0 then
-- continue script
end if
---------------------------------------------------------------------------
Using character count rather than a straight compare (e.g. sel = "") allows for a selection of more than 32K.
(Works in Eudora 5.x - others not tested.)
--
Best Regards,
Christopher Stone
______________________________
StoneWorks Computer Consulting
email@hidden