Hiding Finder Sidebar with AppleScript

Discussion in 'OS X Mavericks (10.9)' started by Avenged110, May 18, 2018.

  1. Avenged110, May 18, 2018
    Last edited: May 18, 2018

    Avenged110 macrumors 6502

    Avenged110

    Joined:
    Aug 2, 2010
    Location:
    Greatest Country on Earth
    #1
    So I'm trying to set up an AppleScript to open a single Finder window with specific view properties and it's working fine, except I can't hide the sidebar. The only instructions I've found online mention using "set sidebar width to 0" but this returns an error in Mavericks. I'm new to AppleScript, so does anyone have any suggestions for accomplishing this? Obviously, I only want the sidebar hidden in this one window. Thanks.
     
  2. BrianBaughn macrumors 603

    BrianBaughn

    Joined:
    Feb 13, 2011
    Location:
    Baltimore, Maryland
    #2
    Mavericks...is there a menu item and/or key combination to "Hide Sidebar"?
     
  3. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #3
    option-command-s will hide the sidebar. I'm wondering if you could have AS send those keystrokes after opening the Finder window?
     
  4. Avenged110 thread starter macrumors 6502

    Avenged110

    Joined:
    Aug 2, 2010
    Location:
    Greatest Country on Earth
    #4
    Yes, it's Opt+Cmd+s.
    That worked! Just had to add a delay before it, but it does the job. That never even occurred to me, thanks!
     

Share This Page