event handler function for ScriptDialog openDialog()..?

Hi,
In the scriptDialog interface scripting section of the python manual, there doesn’t seem to be a solution for calling a function to handle when the submission script dialog window first opens…ie: There is a “closeDialog()” function, but not an “openDialog()” function.
I need to call an event handler function when the submission script winwod first opens. The function checks the state of certain settings and then applies other settings as a result, as the dialog interface appears and NOT after a user changes a setting using the normal even handler function.
Thanks,
Mike

Hey Mike,

Try adding a handler for the scriptDialog’s ‘Shown’ event before you call the .ShowDialog() function, and sticking your code in the handler function.
Ie, something like this:

[code]
[scriptDialog initialization code]
scriptDialog.Shown += Testing

scriptDialog.ShowDialog()

def Testing(*args):
#Code goes here…[/code]

That should hopefully do the trick for what you want to do :slight_smile:

Cheers,

  • Jon

Thanks Jon, that worked perfectly!

BTW, I’m not receiving any automatic emails from your site any more, with regard a reply thread being made.
I don’t think its my email server as it was working before just fine.
It seemed to stop working around the same time that your site went down which was about 2 days ago or so, earlier this week.
Might be an idea to restart your email system!

Regards,
Mike