• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Requesting advice with getting Mail message rows.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Requesting advice with getting Mail message rows.


  • Subject: Requesting advice with getting Mail message rows.
  • From: Brian Christmas <email@hidden>
  • Date: Mon, 05 Nov 2012 17:53:15 +1100

G'day Scripters

This works, but is a bit slow

if StoreMailBox = "" or StoreMailBox ≠ selected mailboxes of message viewers then
tell application "System Events" to tell process "Mail"
tell table 1 of scroll area 1 of group 1 of splitter group 2 of splitter group 1 of window 1
set tempList to every row --where (first UI element of UI element 1 whose role is "AXDisclosureTriangle") = 0
repeat with ThisMessage in reverse of tempList
try
if value of ((first UI element of UI element 1 of ThisMessage) whose role is "AXDisclosureTriangle") = 0 then tell ((first UI element of UI element 1 of ThisMessage) whose role is "AXDisclosureTriangle") to click
on error errmsg number errnum
if errnum ≠ -1719 then display dialog errmsg & errnum
end try


end repeat
end tell
end tell
set StoreMailBox to selected mailboxes of message viewers
end if

This would be faster, and compiles, but returns zero rows. Is it possible to do this, or am I barking up the wrong tree?

Regards

Santa


if StoreMailBox = "" or StoreMailBox ≠ selected mailboxes of message viewers then
tell application "System Events" to tell process "Mail"
tell table 1 of scroll area 1 of group 1 of splitter group 2 of splitter group 1 of window 1
set tempList to every row where (first UI element of UI element 1 whose role is "AXDisclosureTriangle") = 0
say (count of tempList)
repeat with ThisMessage in reverse of tempList
try
#if value of ((first UI element of UI element 1 of ThisMessage) whose role is "AXDisclosureTriangle") = 0 then 
tell ((first UI element of UI element 1 of ThisMessage) whose role is "AXDisclosureTriangle") to click
on error errmsg number errnum
if errnum ≠ -1719 then display dialog errmsg & errnum
end try


end repeat
end tell
end tell
set StoreMailBox to selected mailboxes of message viewers
end if
 _______________________________________________
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

  • Follow-Ups:
    • Re: Requesting advice with getting Mail message rows.
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: How can I control invisible files
  • Next by Date: Re: Requesting advice with getting Mail message rows.
  • Previous by thread: Re: How can I control invisible files
  • Next by thread: Re: Requesting advice with getting Mail message rows.
  • Index(es):
    • Date
    • Thread