Some help in scripting some common actions

Hello,

I’ve been looking pretty heavily into Automator and AppleScript to help me do some things that I need in Entourage that I had previously in Outlook / VBA.

To start with, I’d like to get Entourage to make an email message have a certain subject line, based on some common criteria. My team uses email tags to sort messages, and so I’d like to be able to make a new message, select some options, and then have Entourage make me a blank that I can use to populate, and then submit to my team.

For example:

What kind of message? [ New ] [ Update ] (radio button, only one allowed) e.g. “New”
What priority? [ Low ] [ Medium ] [ High ] (radio button, only one allowed) e.g. “Medium”
What additional information? [ Category 1 ] [ Category 2 ] [ Category 3 ](checkboxes, mark all that apply) e.g. “Category 1, Category 3”
Items in set: (number, and iterates for each a new message) e.g. “3”

Subject: (free form text) “This is my message”

And the output might be 3 message stubs, ready for body info to be applied, with subject lines like:
[New][M][Cat1][Cat3][1/3] This is my message
[New][M][Cat1][Cat3][2/3] This is my message
[New][M][Cat1][Cat3][3/3] This is my message

Is this possible with AppleScript? I think that I can use Dialog to do “radio button” type selections (use ‘button’ and then record the name of what is returned), but I cannot figure out how to do checkboxes. Also, I would REALLY like to do all of these in one form, instead of having to click several times on several separate dialogs. Any pointers to how to make this happen? I’d really like it to be integrated so that I could just use a hotkey or other kind of trigger, perhaps even highlight a message in my inbox, run the script with the message as the input and have it forward the message with an altered subject line based on my selections.

Thanks!

Hi,

you can accomplish this in one window with AppleScript Studio, which is a part of the Developer Tools (Xcode).
In plain AppleScript you can simulate the check boxes with a list allowing to choose multiple items


set chosenItems to choose from list {"Category 1", "Category 2", "Category 3"} with multiple selections allowed

Excellent, thanks!

Is an AppleScript Studio project callable from the Entourage scripts menu? Or automator? I’d like to remain in the one app for ease-of-use sake.

With AppleScript Studio you can either create a stand alone application,
which can be launched like all other applications, or you use the ability of AppleScript Studio applications to be scripted.
Then you can control the UI elements like windows or buttons, input and output by a plain AppleScript