Hey abr!
So... fairly significant changes so PLEASE TEST BEFORE RELYING ON IT. I've renamed the entire script and package, so if you'd like - just DISABLE the old package by UN-checking it's main listing in Prefs rather than deleting the old package - at least while you test and prove out the new version.
Here's a (mostly) full rundown of the changes:
First: please note that as mentioned - I've renamed the package from OnAfterFolderChange_LinkedTab_AutoOpenClose to LinkedTab_AutoOpen_Handler. When some of my scripts started handling multiple events, it just didn't make any sense to prepend the script names with the event(s) it was handling.
In addition, I've pulled the OnCloseTab_LinkedTab_AutoClose component out of the package. It's otherwise always available as a separate package download...
Beside that, here's a list of new and changed options I implemented in v1.2.0 based on your previous request(s):
- Always_On: allows use of the script without having to enable it via environment variables (replaces old LinkedTab_AutoOpen option, but is now entirely separate from env var based control)
- DEBUG_CLEAR: renamed from old option CLEAR_OUTPUT
- LinkedTabList: renamed from old option objLinkedTabList
- Openindual_Mode: allows setting the preferred dual display mode (vertical or horizontal)
- OpenLinkedTab_Action: allows setting a user defined Opus command to be run after the scripts normal function. For instance, if you disable opening the paired folder in SLAVE tabs (new option below), perhaps you want to enable NavLock instead - OR - NAVSYNC .
- OpenLinkedTab_Slaved: allows controlling whether or not the linked paired folder tabs are SLAVED or not
- QualKey: renamed from old option LinkedTab_AutoOpen_QualKey
- Qualkey_Disable: allows setting a qualifier key to DISABLE the scripts
In addition to the new and revised options, I've also implemented a LinkedTab_AutoOpen command in this version. The command functions as follows:
The LinkedTab_AutoOpen script command is used to:
- RESET the current source tab to the initial path defined in scripts LinkedTabList option
- RESYNC the current (or new) linked destination tab with the current source tab
Command Arguments:
Argument Type Possible values Description
RESET /S (no value) Compares the current source tab path to the list of all path entries
in the scripts LinkedTabList option. If the script determines that the
current path is a child of any of those defined as a paired folder in
the option, then the source tab is reset back to that initial path.
RESYNC /O (no value) With no optional value, the RESYNC argument defaults to the read behavior
described below...
create Compares the current source tab path to the list of all path entires in
the scripts LinkedTabList option. If the script determines that the
current path is a child of any of those defined as a paired folder in
the option, then the difference between the initial path saved in the
option and the current path is set as a 'relative path'.
The script then checks to see if this path exists relative to the
'paired' folder path. If it [b]DOES[/b] exist, the current linked
destination tab (if no dest tab is open AND linked, a new one will be
opened) is then switched to that relative path, one sub-folder at a
time (in order to provide a backlist history that might match the
source). If the relative path does [b]NOT[/b] exist, the script will
try to create it and then open it.
read Performs a similar 'relative path' as the 'create' option, however
if the path does NOT exist relative to the 'paired' folder path, no
attempt to create the missing folder structure in it is performed.
Instead, the 'read' option functions similarly to the RESET argument,
but for the destination tab instead of the source.
Note that this doesn't truly 'sync' the two tabs... but it's a way to
get the linked paired folder tab open to its initial path if for some
reason one wasn't opened when you first entered the trigger folder in
the source. This could happen if you rely on either the environment
variable or hotkey script controls, and simply forgot to use one of
those methods before navigating down into the source folder structure.
It prevents you from having to go BACK, and then turn on the script
controls, then navigate forward again - all just to get the paired
folder tab open.