- Joined
- Nov 23, 2008
- Messages
- 2
- Reaction score
- 0
- Points
- 1
So I've been sick for a while and decided to try my hand at applescript-ing, specifically with writing a script that would automatically, periodically check Mail for new mail and notify me with a Growl notification. It's not working so well and I thought I'd put it out there to see if anyone could tell me what I'm doing wrong
here's a screenshot of the applescript window: TinyGrab
the script itself:
tell application "Mail"
set allAccounts to every account
check for new mail of allAccounts
if the read status of Mail of allAccounts is greater than 0 then
return true
tell "GrowlHelperApp" to notify
if the read status of Mail of allAccounts is equal to 0 then
return false
end if
else
tell "GrowlHelperApp" to close
end if
end tell
and the error:
error "Can’t get Mail of {account \"Gmail\" of application \"Mail\", account \"[email protected]\" of application \"Mail\"}." number -1728 from Mail of {«class mact» "Gmail", «class mact» "[email protected]"}
I'm really new to this so any help would be really appreciated
here's a screenshot of the applescript window: TinyGrab
the script itself:
tell application "Mail"
set allAccounts to every account
check for new mail of allAccounts
if the read status of Mail of allAccounts is greater than 0 then
return true
tell "GrowlHelperApp" to notify
if the read status of Mail of allAccounts is equal to 0 then
return false
end if
else
tell "GrowlHelperApp" to close
end if
end tell
and the error:
error "Can’t get Mail of {account \"Gmail\" of application \"Mail\", account \"[email protected]\" of application \"Mail\"}." number -1728 from Mail of {«class mact» "Gmail", «class mact» "[email protected]"}
I'm really new to this so any help would be really appreciated