Using Applescript to Navigate in Entourage

J

Jeff Moore

I need to do something painfully simple in Entourage 2004 in OS X
(Panther/Tiger ixed environment) using Applescript. All I need to do
is select the next message and the scripts process what I need. For the
life of me I can't seem to get the syntax to hook into moving the
current selection...

I currently have the pointer set using the following code:

set theMsgs to (current messages)
repeat with theMsgs in theMsgs
...do a whole bunch of code ...
end repeat
*select next message code*

The principle is that the user could select one message in a directory
and the looping code will advance through processing each message.

Thanks...
 
M

matt neuburg

Jeff Moore said:
I need to do something painfully simple in Entourage 2004 in OS X
(Panther/Tiger ixed environment) using Applescript. All I need to do
is select the next message and the scripts process what I need. For the
life of me I can't seem to get the syntax to hook into moving the
current selection...

I currently have the pointer set using the following code:

set theMsgs to (current messages)
repeat with theMsgs in theMsgs
...do a whole bunch of code ...
end repeat
*select next message code*

The principle is that the user could select one message in a directory
and the looping code will advance through processing each message.

But you've already solved the problem - you're getting a reference to
every one of the desired messages, in turn. Example:

tell application "Microsoft Entourage"
set theMsgs to (current messages)
repeat with aMsg in theMsgs
display dialog (get subject of aMsg)
end repeat
end tell

Instead of "display dialog", just substitute whatever it is you want to
do to each message.

m.
 
Top