On 6/30/02 4:03 PM, "Rick Johnson" <[EMAIL PROTECTED]> wrote:
> I'd like to try my first Entourage X AppleScript, but I'm not sure if what I
> want to do is practical, or even possible.
>
> If the current window is an outgoing message, I'd like to do two things:
Windows aren't messages. They ay be displaying messages and/or they may be
'draft windows': unsaved new message windows..
>
> 1) Insert predefined text at the cursor location and move the cursor to the
> beginning of the inserted text. "source of message" seems it should return
> the text of the message, but is there a way to get or set the cursor
> location?
'source' is not what you want here. You can insert text at the cursor
location in a draft window (previously saved draft messages can be re-opened
as draft windows too):
if class of window 1 is draft window then
set selection to "Some new text here. "
end if
But no, there is mo way at all to reset the cursor location. you could do I
in Entourage 2001 with the use of suitable scripting additions (Sigma's
Additions, for example) but these don't exist or work in OS X. Yes, perhaps
with QuicKeys you could record yourself typing command-up arrow, which will
do it (and which you could emulate with Sigma's, Sandi's or Akua).
>
> 2) Change the signature to "None."
That's easy enough:
set signature type of window 1 to none
Only works for draft windows, so include it in the 'if' clause. (If you ever
send news messages, then that first line should be instead:
if {class of window 1} is in {draft window, draft news window} then
set selection to "Some new text here. "
set signature type of window 1 to none
end if
If you save window 1, it becomes an outgoing message, and you can access
various message properties this way:
save window 1 -- saves in drafts folder
set theMsg to displayed message of window 1
-- close window 1 saving yes -- alternate possibility
or you may not need to do that all. Just
send window 1
>
> I've written a few scripts for the Finder and Adobe Illustrator, but I seem
> to be at a loss with this one. I'd appreciate any suggestions, even if it's
> just to buy QuicKeys.
>
--
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/>