Entourage 2004: Applescript to repair message list (IMAP)

I am working with Entourage 2004 - 11.2.1.

When accessing an Exchange mail server with IMAP, very often messages in the Inbox folder are “duplicated” (they appear exactly the same twice or three times) until I recreate/repair the message list (right-clicking the “Inbox” icon and selecting Alt + Command + L, which is different from simply updating the list with command + L). This command does not have its own menu and can only be seen with right-clicking the folder.

This collect and recreate the updated and “clean” list which last for a while until new apparently duplicated messages appear, until another cleaning.

I was wondering if there is a way to write an Applescript to be added and scheduled every x minutes.
Unfortunately I have no experience in scripting Entourage, although I would know the steps required:

A - select “Inbox” folder (little icon) in the left column (where all the folders are)
B - perform " Alt + Command + L

Many thanks for your kind attention!

It might be easier to find out why you’re getting out of sync so often.

There’s a refresh command, in the Mail and News Suite, but I don’t know which of the two -L operations it does. Worth a shot. Something like this?

tell application “Entorage”
tell folder whose name is “Inbox”
end tell
end tell

I know I should understand the reason, but could not find any so far…
Thanks for the hint, unfortunately (at least my) Entourage does not understand the command “refresh”… so I could not see if it works