• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Refresh Finder view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refresh Finder view?


  • Subject: Re: Refresh Finder view?
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 03 Apr 2013 12:49:43 -0500

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

 _______________________________________________
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

  • Follow-Ups:
    • Re: Refresh Finder view?
      • From: Robert Poland <email@hidden>
References: 
 >Refresh Finder view? (From: Robert Poland <email@hidden>)
 >Re: Refresh Finder view? (From: "koenig.yvan" <email@hidden>)
 >Re: Refresh Finder view? (From: Robert Poland <email@hidden>)
 >Re: Refresh Finder view? (From: Alex Zavatone <email@hidden>)
 >Re: Refresh Finder view? (From: Christopher Stone <email@hidden>)

  • Prev by Date: Script to pause/suspend Safari when in the background and resume when in foreground
  • Next by Date: Re: Script to pause/suspend Safari when in the background and resume when in foreground
  • Previous by thread: Re: Refresh Finder view?
  • Next by thread: Re: Refresh Finder view?
  • Index(es):
    • Date
    • Thread