Mojave Finder Can’t Set Sidebar Width

FYI, the following no longer works, regardless of the window reference or the value chosen:

tell application "Finder" to tell the front Finder window to set the sidebar width to 0 



It’s working OK for me (Mojave 10.14.3). Have you tried logging out and back in, or restarting?

I tested the command to set the width of the sidebar and it worked fine for me with Mojave.

For years I have used an AppleScript that sets various values of the Finder including the width of the sidebar and it stopped working with Mojave. Perhaps that is also the case for the OP.

EDIT 2/21/19. I did some work on my existing script–which sets properties of a Finder window–and found that it works for the most part as it did prior to Mojave. These properties include column width, sort column, sort direction, text size, and relative dates. All of these properties stick after the script restarts the Finder window, which is necessary to enable the new settings.

The only exception to the above appears to be sidebar width, which works but does not stick after the script restarts the Finder. I don’t know why.