Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Help with Applescript
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="shades.of.gray" data-source="post: 1050149" data-attributes="member: 75200"><p>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</p><p>here's a screenshot of the applescript window: <a href="http://www.grab.by/4i9m" target="_blank"> TinyGrab</a></p><p></p><p>the script itself:</p><p>tell application "Mail"</p><p> set allAccounts to every account</p><p> check for new mail of allAccounts</p><p> </p><p> if the read status of Mail of allAccounts is greater than 0 then</p><p> return true</p><p> tell "GrowlHelperApp" to notify</p><p> </p><p> if the read status of Mail of allAccounts is equal to 0 then</p><p> return false</p><p> end if</p><p> else</p><p> tell "GrowlHelperApp" to close</p><p> end if</p><p>end tell </p><p></p><p></p><p>and the error:</p><p>error "Can’t get Mail of {account \"Gmail\" of application \"Mail\", account \"myemail@live.com\" of application \"Mail\"}." number -1728 from Mail of {«class mact» "Gmail", «class mact» "myemail@live.com"}</p><p></p><p>I'm really new to this so any help would be really appreciated</p></blockquote><p></p>
[QUOTE="shades.of.gray, post: 1050149, member: 75200"] 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: [url=http://www.grab.by/4i9m] TinyGrab[/url] 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 \"myemail@live.com\" of application \"Mail\"}." number -1728 from Mail of {«class mact» "Gmail", «class mact» "myemail@live.com"} I'm really new to this so any help would be really appreciated [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Help with Applescript
Top