On 11/17/00 8:48 AM, "Bryan Harris" <[EMAIL PROTECTED]> wrote:

> 
> 
> Akua Sweets has a function called "Puppet menu" that'll do this.  I hear it
> has issues though, something about not activating the menu command in time
> for the next line of code to act on it.

Not a good idea. That's not the reason. I've explained it so many times I'm
not going to do it again. You can try it. (Even the 'activate' isn't
necessary because all scripts running from the Entourage script menu  have
Entourage activated by definition).

There's more chance of Sigma's Additions or Sandi's Additions working here.
But they too, won't work if there's another command afterwards. Here there
doesn't seem to be any following command so you can try this. Get Sigma's
Additions osax at http://www.osaxen.com, put it into your Scripting
Additions folder in System folder, and restart computer.  Then see if this
works:

    type text "r" holding down command
    type text return
    type text "s" holding down command

But i predict that timing will get you and something won't happen. Why not
script it properly? These are all very, very easy things to script in
Entourage. And this is much better than using emulation tricks. Why do it
that way, when Entourage's applescripting is 1000% more reliable? I've put
in a little error-check to make sure you're only doing this with a received
message :

   
tell application "Microsoft Entourage"

        try
            set theMsg to displayed message of window 1
            if class of theMsg � incoming message then error -128
on error
            beep
            display dialog "The script only works with a received message in
the front window."
             return
        end try
    
        set replyMsg to reply to theMsg
        set selection to return
        save window 1
    
end tell        






>>> Can someone write an applescript that simply does the equivalent of the
>>> following commands in Entourage:
>>> 
>>> COMMAND-R
>>> RETURN (control-M?)
>>> COMMAND-S
>>> 
>>> I could do it in KeyQuencer, but I'm not using that any more and would like
>>> to move on to Applescripts, especially since they are nicely integrated into
>>> Entourage.
>> 
>> Honestly, this is a task better suited for something like KeyQuencer or
>> OneClick, rather than AppleScript. If there is an osax that will let you
>> "type" a key (such as Return) (Allen? Paul? Anyone know of such?) then this
>> could work, but otherwise it can't really be done elegantly with AS.
>> 
>> Part of the problem is that Entourage's reply to always quotes the entire
>> message, not just selected text as the menu option does. There are osaxen
>> that will let you select menus, but so will OneClick (and KeyQuencer, too,
>> although I don't know much about it).
>> 
>> In OneClick, for example, it would be a simple script of:
>> 
>> KeyPress Command "r"
>> Type Return
>> KeyPress Command "s"
>> 
>> ...almost exactly as you've outlined it. (Well, there would need to be some
>> code to wait for the window to be created before typing the Return, but
>> that's fairly trivial.)
>> 
>> It *could* all be done with vanilla RppleScript, but it would take some
>> doing.
>> 
>> George
> 

-- 
Paul Berkowitz


--
To unsubscribe:               <mailto:[EMAIL PROTECTED]>
To search the archives:
          <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to