Book Reviews


[Day Permalink] Tuesday, June 1, 2004

[Item Permalink] Scripting Entourage 2004: moving/copying messages to folders -- Comment()
I have been trying to write an AppleScript command for Entourage 2004 to move a message or messages to a certain folder. For some reason I'm running into problems. In Mac OS X mail this worked fine. Here is my current try:
on run
  tell application "Microsoft Entourage"
    if the class of the front window is message window then
      set selectedMessages to the displayed message of the front window
    else
      set selectedMessages to the selection
    end if
    if selectedMessages is {} then
      display dialog "Select a message and then run this script." with icon 1
      return
    end if
    repeat with theMessage in selectedMessages
      move theMessage to folder "latu" in folder "ap"
    end repeat
  end tell
end run
Entourage reports that it can't get the message. Why is that?

Update: Something seems to be broken/changed in AppleScript with Entourage 2004. There were some minor inconveniences, which finally convinced me to go back to Mail on Mac OS X. Of course, Mail has it's share of problems, but the general usability is better, and I have all kinds of keyboard shortcuts working.