PathFinder - keep dual panes having equal widths?

I use PathFinder as a Finder replacement. One annoyance is that when opening a second pane the widths of the two panes are not equal, requiring me to manually make them so.

Anyone know if KM could be employed to keep these two panes equal in size?

Hey Michael,

Keyboard Maestro can’t do it directly, but it can be done with AppleScript’s UI-Scripting capability.

Run this AppleScript from the Script Editor.app to see it in action.

Change this line:

set value to splitterPosition

to

value

To get the current position of the splitter. Position it exactly where you want, and run the script.

Then change the value of the splitterPosition variable to suit in this script and run from an Execute an AppleScript action in Keyboard Maestro.

----------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2018/03/16 03:46
# dMod: 2018/03/16 03:46 
# Appl: Path Finder, System Events
# Task: Move File Panel Splitter Position to an Arbitrary Position
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Path_Finder, @System_Events, @Move, @File, @Panel, @Splitter, @Arbitrary, @Position
----------------------------------------------------------------

set splitterPosition to 742

tell application "System Events"
   tell application process "Path Finder"
      tell window "Dropbox"
         tell splitter group 1
            tell splitter group 1
               tell splitter group 1
                  tell splitter group 1
                     tell splitter 1
                        set value to splitterPosition
                     end tell
                  end tell
               end tell
            end tell
         end tell
      end tell
   end tell
end tell

----------------------------------------------------------------

Someone enterprising enough could use UI-Scripting to read the various dimensions of the panels in Path Finder and cause the splitterPosition variable to be automatically calculated.

But I’m not going to go there…   :sunglasses:

-Chris

I also use PF instead of Finder. I'm not clear on what you mean by "opening a second pane".
Could you please provide the menu/shortcut for this, and a before/after screenshot?

I’m talking about what PF calls opening a “new browser” which ends up creating a new browser tab within PF.

Hey Michael,

Did you try the script I posted?

-Chris

OK, thanks for the clarification.
A new PF Browser is a new window, not part of the original window.

In that case, all you need to do is get the width of the first window, and then apply that to the new Browser window. This is quite different than the condition that @ccstone's script addresses.

KM offers many tools to access windows. If you do a search of this forum for "window" and/or the KM Wiki Search for Windows you should find the info you need to write this macro. Give it a try, and if you get stuck, holler back and we'll try to help.

Hey @ccstone and @JMichaelTX thanks for the replies. Honestly I've not had time to look into this closely, but hopefully will be able to soon.

One question for you @JMichaelTX - When you say that a "new PF browser is a new window" -- is that true even though it appears inside the main UI?

Here's what it looks like to me, where I have numbered what I am calling the "browsers":

Yep. We have be careful and precise in our terminology.
There are two "Browser" commands in the PF menus:

New Browser Window

This is the one I was referring to.

image

Two Browsers in Same Window

This is what you are showing in your last post.

image

So, now that your requirement is very clear (which @ccstone correctly guessed), I have revert and say that Chris' macro should work.