I just thought I'd share this with the community since I spent a little time researching this and didn't see any other articles online which showed how to do this. You can rebuild the Entourage database via AppleScript with the following code: tell application "Microsoft Database Utility" activate end tell tell application "System Events" tell process "Database Utility" tell window "Database Utility" click radio button "Rebuild database" click button "Continue" end tell end tell end tell The osascript may be a little more useful since it could be sent out to multiple systems simultaneously using Apple Remote Desktop's Send Unix feature. You can send all three lines at the same time. /usr/bin/osascript -e 'tell application "Microsoft Database Utility" to activate' /usr/bin/osascript -e 'tell application "System Events" to tell process "Database Utility" to tell window "Database Utility" to click radio button "Rebuild database"' /usr/bin/osascript -e 'tell application "System Events" to tell process "Database Utility" to tell window "Database Utility" to click button "Continue"'
Great script. Works great. Is there any way to ensure that one's "Main Identity" is always selected? How about a way to automatically close the database utility once the rebuild is complete? Also, you'd probably want to ensure that all office apps are closed before launching the rebuild (tell application "microsoft excel" to quit, etc) "Mason Rove" wrote: > I just thought I'd share this with the community since I spent > a little time researching this and didn't see any other articles online > which showed how to do this. > > You can rebuild the Entourage database via AppleScript with the following > code: > > tell application "Microsoft Database Utility" > activate > end tell > > tell application "System Events" > tell process "Database Utility" > tell window "Database Utility" > click radio button "Rebuild database" > click button "Continue" > end tell > end tell > end tell > > > The osascript may be a little more useful since it could be sent out to > multiple systems simultaneously using Apple Remote Desktop's Send Unix > feature. You can send all three lines at the same time. > > /usr/bin/osascript -e 'tell application "Microsoft Database Utility" to > activate' > > /usr/bin/osascript -e 'tell application "System Events" to tell process > "Database Utility" to tell window "Database Utility" to click radio button > "Rebuild database"' > > /usr/bin/osascript -e 'tell application "System Events" to tell process > "Database Utility" to tell window "Database Utility" to click button > "Continue"' > >
Brad, those are all great, valid points that you made. I'll see if I can add in those features that you suggested. On 6/27/08 10:12 AM, in article 128EFA32-4758-4510-B449-8AD7A6B3C16F@microsoft.com, "brad.lane" wrote: > Great script. Works great. Is there any way to ensure that one's "Main > Identity" is always selected? How about a way to automatically close the > database utility once the rebuild is complete? > > Also, you'd probably want to ensure that all office apps are closed before > launching the rebuild (tell application "microsoft excel" to quit, etc) > > > > "Mason Rove" wrote: > >> I just thought I'd share this with the community since I spent >> a little time researching this and didn't see any other articles online >> which showed how to do this. >> >> You can rebuild the Entourage database via AppleScript with the following >> code: >> >> tell application "Microsoft Database Utility" >> activate >> end tell >> >> tell application "System Events" >> tell process "Database Utility" >> tell window "Database Utility" >> click radio button "Rebuild database" >> click button "Continue" >> end tell >> end tell >> end tell >> >> >> The osascript may be a little more useful since it could be sent out to >> multiple systems simultaneously using Apple Remote Desktop's Send Unix >> feature. You can send all three lines at the same time. >> >> /usr/bin/osascript -e 'tell application "Microsoft Database Utility" to >> activate' >> >> /usr/bin/osascript -e 'tell application "System Events" to tell process >> "Database Utility" to tell window "Database Utility" to click radio button >> "Rebuild database"' >> >> /usr/bin/osascript -e 'tell application "System Events" to tell process >> "Database Utility" to tell window "Database Utility" to click button >> "Continue"' >> >>