Just so we're on the same page here: you need to trigger your script with the OnTabSwitch event.
Then within the script check the target panel, and if necessary – e.g. GetValue ( Get (TriggerTargetTabPanel ) ; 2 ) = "verboten!" – exit the script with a result of 0 (or the keyword False, without quotes), which will cancel the tab switch and leave the user where they are.
1 of 1 people found this helpful
So I'm guessing you are using the script trigger onTabSwitch, which will run the script before it switches tabs, as far as I know.
Then all you would need to do is:
Go to new tab panel
Else not allowed:
Exit Script[False] //That will leave you on the current panel
Let me know if I am misunderstanding or leaving something out.
Thanks for your comments. My onTabSwitch script attempted to allow the user to navigate to a specific target panel. Although I had used the script result "false" upon exit, the script could be called from any tab panel. Never could find a "Go To TabPanel" script step, but exiting seems to work fine. Thanks again.
Not your original question, but you can give each tab panel an object name, then use the Go to Object: <Object Name> script step. That gives you your Go to TabPanel functionality.