Open viewer pane when entering designated folders

This script should make a good starting point, since it does something similar:

If you use multiple tabs, you'd probably want to also want to handle the OnActivateTab event so the viewer pane turns on and off when you change tabs.

You might also want to extend the script so it can run a different command when the current folder/tab does not match the list, so it can turn the viewer pane off in non-matching folders, and on in matching ones.