Hiding Finder Sidebar with AppleScript

Avenged110

macrumors 6502a
Original poster
Aug 2, 2010
511
376
Greatest Country on Earth
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.
 
Last edited:

Weaselboy

Moderator
Staff member
Jan 23, 2005
30,718
10,505
California
option-command-s will hide the sidebar. I'm wondering if you could have AS send those keystrokes after opening the Finder window?
 

Avenged110

macrumors 6502a
Original poster
Aug 2, 2010
511
376
Greatest Country on Earth
Mavericks...is there a menu item and/or key combination to "Hide Sidebar"?
Yes, it's Opt+Cmd+s.
option-command-s will hide the sidebar. I'm wondering if you could have AS send those keystrokes after opening the Finder window?
That worked! Just had to add a delay before it, but it does the job. That never even occurred to me, thanks!
 
  • Like
Reactions: Weaselboy
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.