Folder switching via AppleScript

D

Dan Gaters

As I peruse my spam, I delete the contents of my "Junk E-mail" folder via:

tell application "Microsoft Entourage"
set storage of messages of folder "Junk E-mail" to folder
"Deleted Items"
end tell

Now, I want the focus to automatically switch to my "Inbox" folder (instead
of looking at a now-empty "Junk E-mail" to folder).

What's the AppleScript line that could next select/highlight the Inbox in a
3-pane window arrangement? Something like:

set current folder to "Inbox" folder

I don't want to open the Inbox in a new window.

Thanks.

DG
 
B

Barry Wainwright

As I peruse my spam, I delete the contents of my "Junk E-mail" folder via:

tell application "Microsoft Entourage"
set storage of messages of folder "Junk E-mail" to folder
"Deleted Items"
end tell

A better one is:

tell application "Microsoft Entourage"
set theMail to every message of folder id 6
delete theMail
delete theMail
end tell

Folder id 6 is always the main junk mail folder under 'on my computer', no
matter what language you are using.

This 'double delete' will move the messages to the deleted items folder,
then delete them from there, so they are completely gone from the database.
Now, I want the focus to automatically switch to my "Inbox" folder (instead
of looking at a now-empty "Junk E-mail" to folder).

What's the AppleScript line that could next select/highlight the Inbox in a
3-pane window arrangement? Something like:

set current folder to "Inbox" folder

set displayed feature of window 1 to folder id 1
 
D

Dan Gaters

Barry Wainwright:
This 'double delete' will move the messages to the deleted items folder,
then delete them from there, so they are completely gone from the database.

Thanks, but I don't want to permanently delete them just yet. :)
set displayed feature of window 1 to folder id 1

Excellent, thanks.

DG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top