from the help file
The $dialog() identifier
$dialog(name/N)
$dialog() also supports these properties:
tab returns id of tab that is currently displayed
What i know that only triggers when you click the tab, not when you have it active and click a button inside that tab. And i didn't want to use a %var to set what tab is activated, thats why i can't use if ($did == ID), that will i use for the "click" on a id inside the dialog/tab