and it behaved flawlessly.
Doesn’t affect "width of column name column” with any settings.
Why are you inserting "id" in your instructions supposed to trigger a property ?
I never did that.
Have used it for years. Works both ways.
Yvan KOENIG (VALLAURIS, France) lundi 13 janvier 2014 10:11:04
Robert Poland - Fort Collins, CO
Ran this one :
property theWidths : {}
my setWidths(100) my setWidths(120) my setWidths(140) my setWidths(160) my setWidths(180)
tell application "Finder" tell window 1 tell its list view options set end of theWidths to get width of column name column end tell # list view options end tell end tell # Finder theWidths
on setWidths(widthNameColumn) set delayTime to 0.1 set widthDateColumn to 223 # size for month, day, year, time delay delayTime set widthSizeColumn to 97 # size for delayTimexx.x MB delay delayTime tell application "Finder" activate delay delayTime set my_chosen_folder to get folder of window 1 as alias delay delayTime
delay delayTime tell window 1 tell its list view options # set list widths set end of theWidths to get width of column name column delay delayTime set width of column name column to widthNameColumn delay delayTime set width of column modification date column to widthDateColumn delay delayTime set width of column size column to widthSizeColumn delay delayTime
end tell # list view options close # be sure that window view is updated end tell # window 1 delay delayTime open folder my_chosen_folder
end tell # Finder end setWidths
Here I got :
tell application "Finder" activate get folder of window 1 --> alias "Macintosh HD:Users:yvankoenig:Desktop:Doigts:" get width of column name column of list view options of window 1 --> 443 …
get folder of window 1 --> alias "Macintosh HD:Users:yvankoenig:Desktop:Doigts:" get width of column name column of list view options of window 1 --> 160 set width of column name column of list view options of window 1 to 180 --> 180 set width of column modification date column of list view options of window 1 to 223 --> 223 set width of column size column of list view options of window 1 to 97 --> 97 close window 1 --> {} open folder (alias "Macintosh HD:Users:yvankoenig:Desktop:Doigts:") get width of column name column of list view options of window 1 --> 180 end tell Résultat : {443, 100, 120, 140, 160, 180}
The script did exactly what it is supposed to achieve.
I ran it upon an other window embedding longer file names. The shorter width settable by hand was 200. So, I replaced the calling instructions by :
my setWidths(220) my setWidths(240) my setWidths(260) my setWidths(280) my setWidths(300)
The resulting list was :
{200, 297, 297, 297, 297, 300}
So, I guess that you are in this late case.
As I am pig headed I made other tests and I feel that I understand now the behavior.
If the sum of the defined columns widths is smaller than the width of the window, the first column is given the greater possible width so that the entire window is used.
I understood that after deciding to apply changes to a single column width, running the script four times changing the window width after each run.
Thanks to the persistance of the property, I got the report of the four runs:
Résultat : {200, 200, 200, 200, 200, 200, 200, 241, 241, 241, 241, 241, 241, 241, 323, 323, 323, 323, 323, 323, 323}
Yvan KOENIG (VALLAURIS, France) lundi 13 janvier 2014 17:06:10
|