Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Another script to file Mail.app messages by sender' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another script to file Mail.app messages by sender
Authored by: gadg on Aug 25, '04 04:44:27PM

What if I had Address Book already running, does it still quit it? I don't know if it's possible to check that and set a status variable somewhere for reference before quitting.

---
the difference between men and boys, is the price of their toys



[ Reply to This | # ]
Another script to file Mail.app messages by sender
Authored by: lanej0 on Aug 25, '04 06:07:35PM
Yeah, I'm sloppy. I rarely ever have address book running -- I use Launchbar for contacts. You can check to see if Address Book is running already, and if it is, leave it running. This little snip should do the trick for you:

tell application "System Events"
	if ((application processes whose (name is equal to "Address Book")) count) is greater than 0 then
		set abRun to "yes"
	else
		set abRun to "no"
	end if
end tell

if abRun is "no" then
     tell application "Address Book" to quit
end if


[ Reply to This | # ]
Another script to file Mail.app messages by sender
Authored by: pfschill on Aug 25, '04 09:53:36PM

Good suggestions. I added the option to close AB as an option to my script. I had a different way to lookup if AB was running but it looks like you are a more experienced AppleScripter than I am so I used your version.

I had been just staring AB on login to speed up the lookups.



[ Reply to This | # ]