I edited my post a bit to make it more clear
EDIT:
Quick question: why do you iterate through the active dialog parts? Can you not use the # or table.maxn() to return the total index value?
i only have to count up if the dialog is still active. the table.maxn() counts every dialog part, even if its not available anymore...
--------
The main problem here is that the dialogbox height ajustment has to be done BEFORE the dialog is shown - so in the dialogs which are pointing to them.
Thats because changing the dialogbox height doesnt have an effect until redrawing/loading the dialog again.
The only chance to know the next dialog is
a) doing it manually (script at the end of the dialog parts action part has specific attributes which point to the next dialog)
b) getting to know what the next dialog is automatically via "DialogPartReturn" (script at the end of the dialog parts action part knows through the int where the next is)... but i cant use integers as a t_link to the dialog, right?