I'd like a simple AppleScript to move a message from the Inbox to another
folder.
As Bras mentioned Rules can be used to move messages, but if you are wanting
to move a folder after reading to another folder, you can do this with a
script.
File Msgs in Folder By: Allen Watson
<
http://tinyurl.com/6brn6c>
With one or more messages selected, this lets you type in a few characters
of a folder's name and moves the messages to that folder. If the match is
inconclusive, it presents a listing of the folders with the first match
selected and lets you select the one you want. Remembers last folder picked
for fast repeat operations. Shortcut assigned: Cmd-Shift-M, and typing the
folder name, will accomplish ALMOST the same thing, and about in the same
time.)
Open Folder By: Allen Watson
<
http://tinyurl.com/69usgu>
Same concept of typing a folder's name, but opens a folder in your browser
window. For your five "main" folders such as Inbox, Outbox, Drafts, Sent,
and Deleted, you can create individual scripts with keyboard shortcuts for
rapid access, but this script lets you pick any folder. (Clicking on the
folder pane at left, and typing a name, will also select the folder, most of
the time.)
I have a few Move to folder xxx for specific folders I use frequently. This
script moves a folder named !To Add. Just modify the script for the folder
you want. Assign a shortcut for easy use. Drawback, too many folders can
start to get confusing and that¹s a lot of shortcuts to remember.
tell application "Microsoft Entourage"
try
set theMessages to current messages
on error
display dialog "select some messages before running this script."
buttons {"Quit Script"} default button 1 with icon stop
return
end try
try
move theMessages to folder "!To Add"
on error
display dialog "An error occurred and the messages were not moved.
Does the folder\"!Recent\" exist?" buttons {"Quit Script"} default button 1
with icon stop
return
end try
repeat with aMessage in theMessages
set the read status of aMessage to untouched
end repeat
end tell
Here is an example of a script that moves messages to a folder ³Read Mail²
that is a subfolder of the Inbox. I have a folder in my Entourage Scripts
folder named ³Move², inside are scripts that move to specific folders.
tell application "Microsoft Entourage"
try
set theMessages to current messages
on error
display dialog "select some messages before running this script."
buttons {"Quit Script"} default button 1 with icon stop
return
end try
try
move theMessages to folder "read mail" of folder "inbox"
on error
display dialog "An error occurred and the messages were not moved.
Does the folder\"read\" exist?" buttons {"Quit Script"} default button 1
with icon stop
return
end try
repeat with aMessage in theMessages
set the read status of aMessage to read
end repeat
end tell
If you have trouble copying this script from the forum, you might want to
subscribe to this newsgroup with Entourage so you can view it in HTML that
will not break the script. The Forum strips out HTML.