Script to toggle SSL on/off

J

Jeff Vandehey

Hey gang, would it be possible to write an Apple Script that will toggle POP
SSL on or off? We have a goofy server thing happening, where SSL needs to be
off while on the university network, but on when you are home. I've showed
everyone where the setting is, but would love to make an applescript that
will take care of the dirty work.

First question, can it be done? Second, does anyone have this in existence
for me to use? If not, what would this take to create?

I have NO scripting experience, but could definitely give it a shot if
possible. Is there a library of script commands for Entourage?

Thanks for the help,
Jeff
 
P

Paul Berkowitz

Hey gang, would it be possible to write an Apple Script that will toggle POP
SSL on or off? We have a goofy server thing happening, where SSL needs to be
off while on the university network, but on when you are home. I've showed
everyone where the setting is, but would love to make an applescript that
will take care of the dirty work.

First question, can it be done?
Yes.

Second, does anyone have this in existence
for me to use?

Not specifically, although my "SMTP Location X' script includes SSL
settings.
If not, what would this take to create?

Reading a few more lines here.
I have NO scripting experience, but could definitely give it a shot if
possible. Is there a library of script commands for Entourage?

It's called the Entourage "Dictionary" and is available, like every other
app's, in Script Editor/Open Dictionary.


There's a problem with making your own script using Script Editor in
Panther, and then running it from the Entourage script menu: it doesn't save
changes to script properties between runs. (Entourage 2004 still has to work
in Jaguar and does not implement the new script menu APIs for Panther.) That
means that instead of just setting the toggle property to its opposite (true
vs. false) you have to check it in an 'if/then' test: more verbose (but
less verbose than this paragraph).


tell application "Microsoft Entourage"
tell POP account "Whatever Its Name"
if POP requires SSL then
set POP requires SSL to false
-- set SMTP requires SSL to false
else
set POP requires SSL to true
-- set SMTP requires SSL to true
end if
end tell
end tell


If you need SMTP SSL to toggle along with POP in tandem, then remove the
double-dashes ("--") for those lines.



--
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.
 
Top