@Leo: Prefs LAYOUT= is what I tried first... and the command itself works fine. The problem is that opening a layout using the Prefs command for a folder based in an OnXFolderChange event handling script causes an infinite loop since the Prefs command has no NOSCRIPT option.
But yeah - I forgot that Go needs a folder, so a Go CURRENT LAYOUT= command works fine.
@vulture: editing posts is generally disabled for most users: Why can't I edit my posts?
Here's a quick modification to my other script that should be ONE way of getting things started for you. There are easier ways - I have lots of additional ~stuff in my script to handle various controlling options and log messaging functions and what-not. And you can certainly keep files on disk with whatever info you want in order to control which folder and layouts get processed. But here's an "example" of how it can be done:
Layout_AutoOpen_Handler.osp (3.25 KB)
Layout_AutoOpen_Handler v1.0.0:
In the Preferences / Toolbars / Scripts page listing for this script, click on the script link and configure the FolderLayoutList option to list a folder path and layout name combination like the following:
lib://My/projects/opus/scripting && my_Scripting
The folder path is the path to the folder which you want to trigger the script. Followed by a double ampersand as a delimiter. Followed by the name of whatever saved lister Layout you want the script to call when you open the folder...
I'll explain other options another time.