By the way you keep saying that the result of a non-existent dialog control is $null, it indicates you haven't enabled the identifier warning option I mentioned in the post above.

//echo -a result: $did(no-such-dialog,999)

If identifier warning is not checked, then yes the result is $null, the same as doing: //echo -a result: $no_such_identifier

However, after identifier warning is enabled, you'll instead see an error message in the status window which halts your script's execution.
Then, you would use the .isid property to check if it exists before trying to use it as a parameter.

if ($did(name, %dialog_id [ $+ [ %loop $+ _3 ] ] ).isid) { did -o name %dialog_id [ $+ [ %loop $+ _3 ] ] 1 %dialog_id [ $+ [ %loop $+ _3 ] ] }

Edit: the error is "* Invalid parameters: $did" not identifier warning, so checking if the dialog-control exists using the .isid avoids that error.

Last edited by maroon; 11/08/20 01:50 PM.