;---------------------------------------------------------------------------------------------------------------------- #DefineFunction udfAskTextBox (strAT_Title, strAT_Prompt, strAT_Default, intAT_Flags, intAT_Reserved) Return AskTextbox (strAT_Title, strAT_Prompt, strAT_Default, intAT_Flags, intAT_Reserved) :CANCEL Return strAT_Default ; Return default string if Dialog has been cancelled resp. closed by escape key. #EndFunction ;---------------------------------------------------------------------------------------------------------------------- ; Test. strFileThis = IntControl (1004, 0, 0, 0, 0) ; We use this script file as test input. IntControl (63, 200, 0, 800, 950) strAT_Title = "Text version 1" strAT_Prompt = "We are testing ... feel free to make some changes." strAT_Default = FileGet (strFileThis) intAT_Flags = 2 intAT_Reserved = 0 strText = udfAskTextBox (strAT_Title, strAT_Prompt, strAT_Default, intAT_Flags, intAT_Reserved) IntControl (63, 200, 0, 800, 950) strAT_Title = "Text version 2" strAT_Prompt = "This text may differ from the original text." strAT_Default = strText intAT_Flags = 2 intAT_Reserved = 0 strText = udfAskTextBox (strAT_Title, strAT_Prompt, strAT_Default, intAT_Flags, intAT_Reserved) :CANCEL Exit