Trouble with script triggers and tab switching
I am having a bit of trouble with a technique of switching tabs via script from Seedcode:
There are two parts to having this work. The first part is that you set the tabs to an OnTabSwitch script trigger that calls:
If [ isEmpty (Get (ScriptParameter ) ) ]
Exit Script [ Result: False ]
with a script parameter of "Get ( ScriptName )". This makes it so that the user cannot change tabs by clicking with a mouse (since there is no ScriptName). But, if a script uses Go to Object [ Object Name: the tab's object name ], the tab switch will work.
What I'm trying to do is to switch between tabs when changing modes (e.g. from Browse to Find). I am using a layout script trigger using onModeEnter. The script called is this:
If [ Get ( WindowMode ) = 1 ]
Go to Object [ Object Name: "Find Tab" ]
Exit Script 
Go to Object [ Object Name: "Browse Tab" ]
If I enter find mode, the script is triggered and the tab correctly switches to what I've labeled as "Find Tab". However, when I switch back to Browse mode, the "Find Tab" stays active; it does not switch back to what I've labeled as "Browse Tab". If I disable the OnTabSwitch script, changing modes works correctly. Can't see why this would be though, since the tab change is being called by a script, therby making the script parameter NOT empty. Am I missing something obvious?