Setting prefs via AppleScript

D

Dan Gaters

Is it possible to set some of the deeper Entourage prefs via AppleScript?

Preferences > Fonts (the 4 options on that pane)
Tools > Accounts (default Mail/News)
Tools > Schedules (Check boxes)

(I looked at the AS dictionary, but didn't see my way through it.)

DG
 
P

Paul Berkowitz

Is it possible to set some of the deeper Entourage prefs via AppleScript?

Preferences > Fonts (the 4 options on that pane)
No.

Tools > Accounts (default Mail/News)
Yes.

Tools > Schedules (Check boxes)
Yes.


(I looked at the AS dictionary, but didn't see my way through it.)

Probably you need to learn some basic AppleScript first, since it's all
there for those who can read dictionaries.


set default mail account to POP account "Account Name" -- or IMAP
account "Account Name", etc.)

set default news server to news server "Account Bane"



'default mail account' and 'default news server' (meaning news account) are
top-level properties of the application, not of some subsidiary element. So
you find them under 'Properties' of the 'application' class, which by
tradition is in the Standard Suite, and is the first place you should look
for an all-over view of the elements (classes) and properties of the app as
a whole.

set enabled of schedule "Schedule Name" to true -- equivalent to
checkmark

If you look up the class 'schedule' you'll see it only has a few properties,
one of which is 'enabled', of type 'boolean' - meaning 'true' or 'false'.
That's the standard way to implement the same as a checkbox in the UI.
('schedule' also responds to the command 'execute' - to run it.)


All these classes : POP account. IMAP account, schedule - are classes :
elements of the 'application', which you can see (in 'application' class)
can be specified 'by name' - as I've done above - by ID, by index, and by
satisfying a test ('first schedule whose name starts with "Send"'). For your
purposes, 'by name' is most useful, I think.


--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
D

Dan Gaters

Paul Berkowitz:
For your purposes, 'by name' is most useful, I think.

Great, thanks. The font prefs I just couldn't see anywhere. Some other
examples I'd seen used ID nums which I didn't know how to get. So "by name"
is fine with me.

DG
 
Top