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 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?

If this works for your solution, why not hide the tab labels altogether, being you need one tab on browse and a different tab for find, and don't want the user to be able to switch them? Then you could use OnModeEnter or OnModeExit triggers to control the tabs. Maybe you could use those with your existing scripts to get it to do what you need it to do.

Thanks Steve. I am actually already hiding the tabs using conditional formatting [ ( Formula: Get ( WindowMode ) ≠ 4 ) set font size to 500 ]. The purpose of the SeedCode script is to prevent the user from clicking on the tabs, but when you're in Layout mode, you can see the tab and tab names; makes it nicer to deal with when editing the layout. And, the script is working for me with OnModeEnter, but only going from Browse Mode to Find Mode, not the other way around. I've checked my labels numerous times and they seem to be correct, so I can't figure out why it's not working when going from Find to Browse.

Thanks Phil and David. I first tried your solution, David, since it was easier, but it didn't work for me. Not sure why; it made complete sense. Then tried your solution, Phil. This did solve it. Thanks to you both.