Re: Refresh Finder view?
Re: Refresh Finder view?
- Subject: Re: Refresh Finder view?
- From: Robert Poland <email@hidden>
- Date: Wed, 03 Apr 2013 16:06:26 -0600
Thanks Chris,
I remember you sending a similar fix sometime in the past, but couldn't find when.
In that one you closed the new window instead on deleting it.
Is there a command that will delete it rather than sending it to the trash?
't Apr 3, 2013, at 11:49 AM, Christopher Stone <email@hidden> wrote:
> On Apr 03, 2013, at 11:38, Christopher Stone <email@hidden> wrote:
>> What Alex didn't say (explicitly) is that you have to reference the target of the window rather than the window.
> ______________________________________________________________________
>
> Didn't we go 'round and 'round with this issue a few years ago? When Lion came out? I'd swear we did, but I can't find it in my archive.
>
> Anyway. The appalling work-around is at the bottom.
>
> It appears that showing/hiding columns is still broken...
>
> -------------------------------------------------------------------------------------------
>
> tell application "Finder"
> tell front window
> tell its list view options
>
> # Fails
> tell column id kind column
> if (get its visible) = true then
> set its visible to false
> else
> set its visible to true
> end if
> end tell
>
> # Fails
> tell column id size column
> if (get its visible) = true then
> set its visible to false
> end if
> end tell
>
> # Works
> tell column id name column
> if (its sort direction) = normal then
> set its sort direction to reversed
> else
> set its sort direction to normal
> end if
> end tell
>
> end tell
>
> # Force the window to update after changing the sort
> set newFl to make new folder at (its target as alias) with properties {name:"wtf?"}
> delay 0.05
> delete newFl
>
> end tell
> end tell
>
> -------------------------------------------------------------------------------------------
>
> It seems to work every time as long as it's not triggered too quickly in succession.
>
> On my system no delay is needed if I don't try to flip my hotkey too quickly.
>
> --
> Chris
Robert Poland - Fort Collins, CO
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden