Is there a JavaScript to show (or hide) the sidebar?

Hello all,

I am working on a script, and I need a way to hide the sidebar if is showing. Can this be done with JavaScript?

Thanks!

Jim

AppleScript would work as well. Any ideas?

I’m a newbie in the automation department but I think you can achieve this by programmatically clicking the menubar item View > Show Sidebar.

For reference: System Events · JXA-Cookbook/JXA-Cookbook Wiki · GitHub

2 Likes