I have a script which I want to perform different actions, depending in which tab in a Tab Set is active, but I am having great difficulty in working out how I can get the index number of the currently selected tab.
You can usually pass the tab to commands without getting its index, but if you really need the index then one way is to loop through the tabs, counting them and stopping once you find the current one.