• 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
Re: Mail: preview pane is visible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail: preview pane is visible


  • Subject: Re: Mail: preview pane is visible
  • From: Christopher Stone <email@hidden>
  • Date: Sat, 24 Oct 2015 08:41:08 -0500

On Oct 24, 2015, at 07:15, 2551 <email@hidden> wrote:
My reading of the Mail dictionary is that this should be settable (it’s not marked as r/o)
______________________________________________________________________

Hey Phil,

Yes, but it's been broken since Mavericks.

But let's not rule-out System Events too early...

This works, and it lets you move the separator-bar around:

------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2015/10/24 08:05
# dMod: 2015/10/24 08:36
# Appl: Mail, System Events
# Task: Toggle Preview Pane Open/Closed.
# Tags: @Applescript, @Script, @Mail, @System_Events, @Toggle, @Preview, @Pane
------------------------------------------------------------------------------
# Throws error if front window is NOT a message-viewer
tell application "Mail" to some message viewer whose index is 1
------------------------------------------------------------------------------
tell application "System Events"
  tell application process "Mail"
    set {null, winY} to size of front window
    set openValue to winY / 2.75
    set closedValue to winY - 10
    tell (first window whose subrole is "AXStandardWindow")
      tell splitter 1 of splitter group 1 of splitter group 1
        if its value is openValue then
          set value to closedValue
        else if its value is closedValue then
          set value to openValue
        else
          set value to closedValue
        end if
      end tell
    end tell
  end tell
end tell
------------------------------------------------------------------------------

I hadn't thought of trying to move the Preview Pane around with System Events.  Thanks for steering me in that direction.  I used to use my old toggle script a lot, and now I can move the splitter-bar I'll use variations of this one even more.

--
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

  • Follow-Ups:
    • Re: Mail: preview pane is visible
      • From: 2551 <email@hidden>
References: 
 >Mail: preview pane is visible (From: 2551 <email@hidden>)

  • Prev by Date: Re: setting message to unread
  • Next by Date: Re: Mail: preview pane is visible
  • Previous by thread: Mail: preview pane is visible
  • Next by thread: Re: Mail: preview pane is visible
  • Index(es):
    • Date
    • Thread