On Jan 27, 2015, at 14:15, dealTek <email@hidden> wrote:I have mavericks 10.9.5 and i can't get this simple script to change the = set width of column id name column to show up with the change... - also set sidebar width also not working....
______________________________________________________________________
Hey Dave,
The issue with column-width is a long-standing bug in the Finder. The width is actually changed, but the window is not updated.
The sidebar-width should be working.
I recommend that you use tell-blocks when using multiple commands that talk to the same object. It's all too easy to misidentify an object successive lines that reference the same object and then become confused by why it's not working correctly.
This script forces the front window to refresh by changing and restoring its target.
-------------------------------------------------------------------- set otherFolder to path to favorites folder tell application "Finder" tell front window set winTarget to its target as alias set bounds to {5, 72, 999, 510} set sidebar width to 100
tell its list view options set w1_Before to width of column id name column set width of column id name column to 386 set width of column id modification date column to 192 end tell
tell its list view options to set w2_After to width of column id name column
{w1_Before, w2_After}
# Comment-out to see before/after widths. set its target to otherFolder set its target to winTarget end tell end tell --------------------------------------------------------------------
-- Best Regards, Chris
|