Most people put stuff like that IN the dialog.
Check yout the Runscript commeand in the dialogs section of the manual on how to call script commands from within a dialog.
Check yout the Runscript commeand in the dialogs section of the manual on how to call script commands from within a dialog.