Possible to change the visibility of a column in finder with AppleScript?
I do not believe it's a bug because if you look at the AppleScript Dictionary for Finder, it shows the following for list view options as a property:


list view options (list view options, r/o) : the list view options for the container window


The user cannot change a read only property, however there is a UI Scripting solution.

That said, I try to avoid UI Scripting whenever possible however, I have the daily need to open an external drive in a particular view, sorted by size and to do this a UI Scripting solution was this only choice I could find.

I've taken the relevant example AppleScript code from it to toggle the visibility of the Kind column:

tell application "Finder"
    if (current view of front Finder window) is equal to list view then
        activate
        my toggleCheckBox("Kind")
    end if
end tell

to toggleCheckBox(thisBox)
    tell application "System Events"
        keystroke "j" using command down
        tell window 1 of application process "Finder"
            click checkbox thisBox of group 1
            click button 2
        end tell
    end tell
end toggleCheckBox


Note that this particular UI Scripting solution does open and close the View Options for the front Finder window and is a bit of a visual distraction and one of the reasons I dislike UI Scripting however, sometimes one has no other choice to accomplish a given task. Note that I'm not saying it cannot be done any other way, just at the present time I don't know another way.



Note: The example AppleScript code is just that and does not contain any error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also Working with Errors. Additionally, UI Scripting may require the use of the delay command as appropriate, needed or wanted.