Dialog.Open() Result

Dialog.Open() result is always empty.

	var dlg = DOpus.dlg;
	//var target = dlg.GetString("Input target path", "D:\\");   // 0 or 1
	var target = dlg.Open("", "", DOpus.listers(0).activetab, "Folder");   // 0
	DOpus.Output(dlg.result)
	do
	{
		msg = dlg.getmsg();
		DOpus.Output(dlg.result)
	} while (msg == true);

The Open method returns a result directly.

Ok, but If I close the dialog, the if statement cannot determine the result.
target always seems to be True.

	var dlg = DOpus.dlg;
	var target = dlg.Open("", "", DOpus.listers(0).activetab, "Folder");
	if (!target) DOpus.Output("bye")
	else
		DOpus.Output(target)

Check target.result. Details are in the docs for the Open method.

Oops, this is different from dlg.GetString("Input target path", "D:\\");, so I didn't look closely.