Here’s an interesting one.
I need to check if Entourage has at least 1 email account setup, but I’de rather not open the program up!
Any ideas people?
Thanks in advance,
Jase
Here’s an interesting one.
I need to check if Entourage has at least 1 email account setup, but I’de rather not open the program up!
Any ideas people?
Thanks in advance,
Jase
Maybe you can parse the preferences or user data files?
Sorry, don’t know what you mean by ‘parse’!
Any other thoughts gang?
use google for things you don’t understand:
you may want to set up a machine, Install Entourage, examine a blank preference vs. one that has accounts set up. hey, it might even be so easy as to not have preferences without a user account. then you have an algorithm for your AppleScript. parsing a file for known entries may be just the way to go.
cheers.
Thanks for this advice.
I understand now, and will see what I can find out.
Jase
I’ve had a look at a pref file with accounts setup and one without.
Can’t seem to tell the difference.
I think that the account settings are buried in the database file, which I don’t seem to be able to read.
Looks like I’ve hit a brick wall.
Doh.
Oh well.
Thanks for your help anyway.
Jase
keep in mind that any difference, however small, might lead you to the right solution.
for example, can you consistently rely on the size of the database when it is empty (not configured with an account) vs. when it has an account? you could also compare modified dates and maybe come up with something like:
if databaseFile is smaller than 10 kb and date modified is later than 11/07/06 then
display dialog “No user configured”
end if
of course that’s psuedocode, but you get the idea. the point is, don’t give up.
cheers.
I can not say this will work for you but my tests on mine seem to.
set smtp to "None"
set imap to "None"
try
set Simap to do shell script "strings ~/Documents/Microsoft\\ User\\ Data/Office\\ 2004\\ Identities/Main\\ Identity/Database | grep -i 'imap' "
set Ssmtp to do shell script "strings ~/Documents/Microsoft\\ User\\ Data/Office\\ 2004\\ Identities/Main\\ Identity/Database | grep -i 'POP3'"
if Simap is not "" then
set imap to paragraph 1 of Simap
end if
if Ssmtp is not "" then
set smtp to paragraph 1 of Ssmtp
end if
end try
display dialog "Possible accounts - " & return & imap & return & smtp