El Capitan - show sidebar - not working

Hi all,

I am looking for a way using applescript in OS X El Capitan 10.11 to “show sidebar” on the frontmost finder window.

When I try to record the finder window and choose menu > “show sidebar” it records what’s below - but this does not work when played back.

tell application “Finder”
activate

set width of column id name column of list view options of Finder window 1 to 522
set width of column id name column of list view options of Finder window 1 to 320

end tell

also this line no longer works

set sidebar width of window 1 to 50

Q: So how do I get applescript to “show sidebar” ?

Thanks - Dave

These may help:

-- Get the Sidebar Width of Finder window 1.
tell application "Finder" to set theSidebarWidth to sidebar width of window 1
return theSidebarWidth
-- Set the Sidebar Width of Finder window 1.
set theSidebarWidth to 152
tell application "Finder" to set the sidebar width of Finder window 1 to theSidebarWidth
-- Toggle the sidebar.
use scripting additions
property defSidebar : 152 -- my default sidebar width
property noSidebar : 0 -- no sidebar

ToggleSidebar()

on ToggleSidebar()
	tell application "Finder"
		activate
		tell Finder window 1
			set theSidebarWidth to sidebar width
			if theSidebarWidth is defSidebar then
				set sidebar width to noSidebar
			else if theSidebarWidth is noSidebar then
				set sidebar width to defSidebar
			end if
		end tell
	end tell
end ToggleSidebar