Programming a switch of view

is it possible to create a shortcut or automation to set tab one to folder A and folder two to tab B (with A and B being the presets)?

Hi Jeff, it should be possible to automate Finder with applescript. And TotalFinder should not block this functionality. TotalFinder does not add any new commands to applescript interface, but you can use keyboard shortcuts to achieve desired end results.

Please try look at this automation script:

I wrote it few years back so I’m not sure if it still works. Maybe some permission will be needed for it to talk to Finder.

Please let us know if it worked for you.

thanks for the suggestion - fails on set target of finderWindow to applePath with error: appleEvent handler failed…

Yes, the script no longer works.

I looked at it and managed to get it working again on my machine:

Thanks for continuing to develop this.
I’m still getting “Finder got an error: AppleEvent handler failed.” on the line: set target of the front Finder window to applePath

Assuming you are using Script to launch the code.

Please go under System Preferences -> Security & Privacy -> Privacy -> Automation

And make sure AEServer and ScriptEditor are in the list and have the checkbox enabled. That is the only thing I can think of causing this trouble. You might have declined some permissions in the past and it is causing this.

I had certainly forgotten to set permissions (running the code from teh editor does not provide a reminder!).
Running the App version gets closer to the desired result but the message:
Finder got an error: AppleEvent handler failed. (-10000)
is still produced…
I’m sure it is something simple (and obvious) but it continues to elude me.
Thanks agin for yoru help

If you have not yet, take a look at Very powerful automation utility, pretty easy to use, reasonable price.

thanks - that’s a new one on me so will give it a try.

KeyboardMaestro is certainly a powerful tool and will interact with TF. But I can’t get it to do what I want (which is to navigate to specific folders in each of two open tabs). It will open the requested folder but does so in a new tab which causes TF to revert from dual pane.

Anyone any ideas on this?

You have to automate it via keyboard shortcuts. E.g. create two separate tabs, set their target paths and then join them into dual view via CMD+U (or via triggering a menu item). TotalFinder does not expose own scripting API.