dialog plugin question

I can’t seem to find this in the v.4 documentation, or on the manpage dumps in the v.5 wiki, or the forums.

How do you capture the results of a dialog, specifically, which button they pushed? It’s got to be simple, I’m embarrassed I can’t find this. I figure if I post the question, within 3 minutes I’ll find the answer myself now.

Thanks in advance.

Normally, just set the return of the dialog function equal to a variable:

var rtn = plugins.dialogs.showInfoDialog('mytitle','mymessage','ok')

If the ok button is pushed in the code above, then rtn will contain the string ‘ok’

Hope this helps.

Jason

Thanks Jason, sure enough, I did figure it out within about 3 minutes. I should have posted.