Le 2 mai 2016 à 17:54, Robert Poland < email@hidden> a écrit :
Hi,
Why doesn't this script work? There is a window 1.
tell application "Finder" tell list view options of window 1 set width of column id size column to 180 end tell end tell
ERROR (Gibberish) LOG: tell application "Finder" set width of column id size column of list view options of window 1 to 180 --> error number -1728 from window 1 Result: error "Finder got an error: Can’t set window 1 to 180." number -10006 from window 1
It fails because you don't use the correct syntax.
Remove id and you will get the correct syntax:
set width of column id size column to 180
This said, you will just have a script which no longer issue an error.
Because an old bug/feature, the defined width will not be applied on the screen.
I was forced to used this code to get the width to apply.
tell application "Finder" set theFolder to target of window 1 as alias tell list view options of window 1 set width of column size column to 80 end tell close window 1 open theFolder end tell
Yvan KOENIG running El Capitan 10.11.4 in French (VALLAURIS, France) lundi 2 mai 2016 18:15:07
|