Re: Setting Finder Column width
Re: Setting Finder Column width
- Subject: Re: Setting Finder Column width
- From: Robert Poland <email@hidden>
- Date: Sun, 05 Oct 2014 12:13:51 -0600
On Oct 5, 2014, at 11:54:AM, Christopher Stone <email@hidden> wrote:
> On Oct 05, 2014, at 11:00, Christopher Stone <email@hidden> wrote:
>> This kind of thing is why I bit the bullet and bought a copy of UI Browser years ago.
> ______________________________________________________________________
>
> Hey Bob,
>
> For completeness on the list here's my window layout.
>
> <Finder.snapz.001.jpg>
>
> The previous script won't work if you hide the Sidebar or the Toolbar & Sidebar.
Needs Scroll area 1 to work without the .
> Okay, you made me do it. I have tried to account for varied window layouts.
My current plan is to strip out the Toolbar etc., do the cleanup then restore them.
> The weird thing is that ~/Documents/ is different from ~/Downloads/ and ~/ even though they have the exact same visual layout. Therefore there might be other discrepancies. Hmm... This may or may not have to do with tagged items showing, but I don't have time to test that right now.
A Shared folder is one of the variables.
> If anyone manages to break it tell me exactly how and where, and I'll attempt to fix it.
>
> Bob: since you can run `cliclick` without giving the path it appears you've installed it in the system path. That is not recommended. /usr/local/bin/ is the traditional place for user-installed cli-tools, and is where the author of `cliclick` Carsten Blüm himself recommends.
In the past Carsten recommended either of the two paths.
> * Note that the column-divider must be visible for the script to work.
Don’t see that.
--
> Best Regards,
> Chris
>
> P.S. Thanks to Bill Cheeseman. Without UI Browser I would not have bothered.
>
> -------------------------------------------------------------------------------------------
> # Auth: Christopher Stone
> # dCre: 2014/10/05 11:02
> # dMod: 2014/10/05 12:46
> # Appl: Finder & System Events
> # Task: Expand Name column to fit
> # Cli : clicclick { http://www.bluem.net/en/mac/cliclick/versions/ }
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @Finder, @System_Events, @Expand, @Name, @Column, @cliclick
> -------------------------------------------------------------------------------------------
>
> set cliclickPath to "/usr/local/bin/cliclick"
>
> tell application "Finder"
> if current view of front window ≠ list view then error "View of front Finder window is not list view!"
> end tell
>
> tell application "System Events"
> set quit delay to 0
>
> tell application process "Finder"
> # set frontmost to true
>
> tell window 1
> --------------------------------------------------------------------------------
> # Strange discrepency for ~/Documents/ and possibly other places.
> --------------------------------------------------------------------------------
> if image 2 of scroll area 2 of splitter group 1 exists then
> tell image 2 of scroll area 2 of splitter group 1
> set {xPosition, yPosition} to position
> set {xSize, ySize} to size
> end tell
>
> else if scroll area 2 of splitter group 1 exists then
> --------------------------------------------------------------------------------
> # Toolbar & Sidebar Showing
> --------------------------------------------------------------------------------
> tell image 2 of UI element 1 of row 1 of outline 1 of scroll area 2 of splitter group 1
> set {xPosition, yPosition} to position
> set {xSize, ySize} to size
> end tell
> else if scroll area 1 of splitter group 1 exists then
> --------------------------------------------------------------------------------
> # Sidebar-only Hidden OR Toolbar & Sidebar Hidden
> --------------------------------------------------------------------------------
> tell image 2 of UI element 1 of row 1 of outline 1 of scroll area 1 of splitter group 1
> set {xPosition, yPosition} to position
> set {xSize, ySize} to size
> end tell
> --------------------------------------------------------------------------------
> end if
>
> set {xPosition, yPosition} to {xPosition + (xSize div 2), yPosition + (ySize div 2)}
>
> end tell
> end tell
> end tell
>
> set shCMD to cliclickPath & " m:" & xPosition & "," & yPosition & " dc:."
> do shell script shCMD
> -------------------------------------------------------------------------------------------
>
> _______________________________________________
> 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
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