Here's a little script that you may find incredibly useful. (Requires AMS 7.5)
This script will allow you to use DialogEx.Close with any type of argument meaning if you did something like:
value would be set to "Hello!".
Code:
DialogEx._Show = DialogEx.Show; DialogEx._Close = DialogEx.Close; function DialogEx.Show(szDialogName, blParentCoordinates, intX, intY) assert(type(szDialogName) == "string", "Argument 1 must be of type string."); if not (blParentCoordinates) then blParentCoordinates = false; end local modalReturn = DialogEx._Show(szDialogName, blParentCoordinates, intX, intY); if (modalReturn == 1001) then local vtReturn = DialogEx._Return; DialogEx._Return = nil; return vtReturn; else return modalReturn; end end function DialogEx.Close(vtValue) DialogEx._Return = vtValue; DialogEx._Close(1001); end
Code:
value = DialogEx.Show("Dialog1");
Code:
DialogEx.Close("Hello!");
Comment