… Thanks Yvan, I noticed that you changed 180 to 80. When I run the script the width changes to 80 regardless what the width is set to AND regardless whether I use or don't use ID.
I used different values to check that it worked.
Here is the full script which I used :
tell application "Finder" set theFolder to target of window 1 as alias tell list view options of window 1 get width of column size column # for test only set width of column size column to 280 end tell close window 1 open theFolder tell list view options of window 1 # for test only get width of column size column # for test only end tell # for test only end tell
and here is the events log.
tell application "Finder" get target of window 1 --> alias "SSD 500:Users:userName:Desktop:Import:" get width of column size column of list view options of window 1 --> 80 set width of column size column of list view options of window 1 to 280 --> 280 close window 1 --> {} open alias "SSD 500:Users:userName:Desktop:Import:" get width of column size column of list view options of window 1 --> 280 end tell
In your original message you wrote that your script failed with an error message. As I saw an anomalie in the main instruction, I directly ran the script without « id » and it worked. So I thought that the extraneous « id » was the wrongdoer.
After reading your late message, I added « id » for see. The script worked flawlessly so, this extraneous « id » wasn’t the wrongdoer and I have no idea of what what the real one.
Yvan KOENIG running El Capitan 10.11.4 in French (VALLAURIS, France) lundi 2 mai 2016 22:50:01
|