Re: Running an Applescript in Mail
Re: Running an Applescript in Mail
- Subject: Re: Running an Applescript in Mail
- From: Christopher Stone <email@hidden>
- Date: Tue, 7 Nov 2017 19:41:39 -0600
Hey John,
Someone asked me off-list why I used this form when the reference to the app is
not strictly necessary.
-----------------------------------------------------------
tell application "Mail"
set mailboxReference to mailbox "ACTION" of application "Mail"
tell (some message viewer whose index is 1)
set selected mailboxes to {mailboxReference}
end tell
end tell
-----------------------------------------------------------
This is because it will fail if written like this (without the reference to the
app):
-----------------------------------------------------------
tell application "Mail"
tell (some message viewer whose index is 1)
set selected mailboxes to mailbox "ACTION"
end tell
end tell
-----------------------------------------------------------
So by habit I just leave in the whole reference whenever I use mailbox
references.
--
Take Care,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden