BTW, for all interested, here is the script I came up with, which takes a
most of what Joseph Swenson did, and added a chunk from an example by Greg
Neagle on the Macenterprise list.
_____________8<____________________
tell application "Microsoft Entourage"
set working offline to true
end tell
set userName to ""
repeat while userName = ""
set theResponse to (display dialog ¬
"Please enter your network ID (ex. smithj):" default answer ""
giving up after 10)
set userName to text returned of theResponse
if gave up of theResponse then
return
end if
end repeat
set domainName to "lmsd.org"
set ldapPort to "3268"
set lastName to do shell script "dscl localhost -read /Active\\
Directory/lmsd.org/Users/" & userName & " " & "LastName | sed 's/LastName:
//' "
set firstName to do shell script "dscl localhost -read /Active\\
Directory/lmsd.org/Users/" & userName & " " & "FirstName | sed 's/FirstName:
//' "
set mailNickname to do shell script "dscl localhost -read /Active\\
Directory/lmsd.org/Users/" & userName & " " & "mailNickname | sed
's/mailNickname: //' "
set displayName to do shell script "dscl localhost -read /Active\\
Directory/lmsd.org/Users/" & userName & " " & "displayName | sed
's/displayName: //' "
set emailAddress to do shell script "dscl localhost -read /Active\\
Directory/lmsd.org/Users/" & userName & " " & "mail | sed 's/mail: //' "
set homeMTA to do shell script "dscl localhost -read /Active\\
Directory/lmsd.org/Users/" & userName & " " & "homeMTA | sed 's/homeMTA: //'
"
copy "" to MTAserver
copy (offset of "CN=Microsoft MTA,CN=" in homeMTA) to startChunk
if startChunk is not 0 then
copy (characters (startChunk + 20) through (count of characters of
homeMTA) of homeMTA) as text to chunk
copy (offset of "," in chunk) to endChunk
copy (characters 1 through (endChunk - 1) of chunk) as text to MTAserver
end if
copy MTAserver & "." & domainName to exchangeServer
set fullName to firstName & " " & lastName
tell application "Microsoft Entourage"
if exists Exchange account lastName then
delete Exchange account lastName
end if
make new Exchange account with properties {name:lastName, Exchange
server:exchangeServer, Exchange ID:mailNickname, domain:domainName, free
busy server:exchangeServer & "/public/", full name:displayName, email
address:emailAddress, LDAP server:"dc01.lmsd.org", LDAP port:ldapPort,
search base:"", maximum entries:100, partially retrieve messages:true,
partially retrieve messages size:50000}
set enabled of schedule "setup" to false
delete schedule "setup"
end tell
display dialog "You will now receive two warnings that a script (this
script) is trying to access your Entourage address book. Please allow access
to the address book by clicking the OK button on each warning. Please enter
your network password when prompted. It will take a few minutes for your
email to synchronize with the server. Please be patient. Thank you."
buttons {"OK"} default button "OK"
tell application "Microsoft Entourage"
activate
set name of me contact to fullName
set address of me contact to emailAddress
set working offline to false
end tell
____________8<___________________
All the user needs to do is supply their network ID in the dialog and the
rest is pulled from AD.
Thank you all.
-Mike
On 6/14/06 10:19 PM, "George" <[EMAIL PROTECTED]> wrote:
> Hello, List -- On 06/15/06 1:18 AM, Perbix, Michael(<[EMAIL PROTECTED]>)
> wrote:
>
>> Thank you....I took a chunk our of this, and I appreciate it. One last
>> question...how do we turn off the Junk Filter?
>
> Tools->Junk Email Protection->None
>
> Cheers,
> George
>
_______________________________________________
Michael Perbix
Lower Merion School District
Telecommunications Specialist
(610) 645-1964 - Work
(610) 896-2019 - Fax
--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>