Is it possible to change a Finder List View column width in AppleScript?

The answer to the subject of your question "Is it possible to change a Finder List View column width in AppleScript?" is YES. The answer to your question about using AppleScript to set the width of the name column to be big enough to display the names without truncating is also yes. I am not sure how to handle the tabs in the Finder window but it sounds as if you have a script that addresses the tabs already.

One big surprise (to me) was that I had to close and re-open the Finder window in order to see the change.

Here is a script that operates on the frontmost Finder window. The width of the "Name" column is set to be 7.5 * (number of characters in the longest name in the window). It is not the perfect width but it works for me as long as I'm using 12-point text in the Finder. We are setting the width of the column to a certain number of pixels, and each character takes a different number of pixels since the Finder is not using a fixed-width font, so we can't be exactly right when setting the width. But 7.5 * the number of characters in the longest name seems to work pretty well. You can adjust it of course.

tell application "Finder"
    activate
    set the_window to window 1
    set current view of the_window to list view
    set the_options to list view options of the_window
    set the_name_column to first column of the_options whose name is name column
    set the_items to name of every item of the_window
    -- get the longest name (count of characters)
    set longest_name to 0
    repeat with I from 1 to count of the_items
        --check for invisible files, which we don't need to consider
        if character 1 of item I of the_items is not "." then
            if (count of characters of item I of the_items) > longest_name then
                set longest_name to count of characters of item I of the_items
            end if
        end if
    end repeat
    -- this only works if the text size is 12. The multiplier 7.5 could be changed
    -- if the text size is something else. 
    set desired_width to longest_name * 7.5
    set width of the_name_column to desired_width
    -- we have to close and reopen the window in order to see any changes.
    -- there might be a "refresh window" command but I don't know it.
    set the_target to target of the_window
    close the_target
    open the_target
end tell

This following code will set the name column, in list view, to fit the size of the longest filename in either every open window or every tab in every window in Finder app. If no Finder windows are open, it will open a new Finder window in list view and set the name column width appropriately.

This code requires the third-party utility, Cliclick.

“Cliclick” is short for “Command-Line Interface Click”. It is a a tiny shell/Terminal application that will emulate mouse clicks or series of mouse clicks (including doubleclicks and control-clicks) at arbitrary screen coordinates. Moreover, it lets you move the mouse, get the current mouse coordinates, press modifier keys etc.

It's free to download but it's donationware, and is easy to install.

On my system I have cliclick in the following directory: /usr/local/bin/. Because of this location, in my AppleScript code and in Terminal app, I need to use the full path to cliclick to call the command. For example: do shell script "/usr/local/bin/cliclick rc:." In AppleScript is telling cliclick to right-click.

This works for me using the latest version of macOS Mojave.

The x and y coordinates used in this following script were set while my display resolution was at 1280 x 800.

global thisWindow

tell application "Finder"
    activate
    if not (exists of Finder window 1) then
        make new Finder window to path to documents folder
    end if
    set theWindows to name of windows
    repeat with i from 1 to count of theWindows
        set thisWindow to item i of theWindows
        set index of Finder window thisWindow to 1
        tell its Finder window thisWindow
            set currentView to current view
            if currentView is not list view then
                set current view to list view
            end if
        end tell
        my setColumnWidth()
    end repeat
end tell

on setColumnWidth()
    tell application "System Events"
        repeat while not (exists of scroll area 1 of splitter group 1 of splitter group 1 ¬
            of window thisWindow of application process "Finder")
            delay 0.1
        end repeat
        set frameBounds to value of attribute "AXFrame" of UI element 2 of row 2 ¬
            of outline 1 of scroll area 1 of splitter group 1 of splitter group 1 ¬
            of window thisWindow of application process "Finder"
    end tell

    set x to (item 1 of frameBounds) - 1
    set y to (item 2 of frameBounds) - 13

    do shell script "/usr/local/bin/cliclick dc:" & x & "," & y -- Double Click At Coordinates
end setColumnWidth


enter image description here

enter image description here