Topic: Dialog_Input_1 conditions (1 of 2), Read 11 times
Conf: Search and Replace
From: LeRoy Stevens
Date: Sunday, March 08, 2009 03:40 PM

I want a dialog box to get user input with the option of Cancel. Sample below. I thought this would be:

#103=Dialog_Input_1(20,^` Met Conversion v1.0`,
`Enter the ...`,
`Example: 035 or 107.`,
`??Source:`,
`[&Ok]`,`[Cancel]`^,@(1),APP+COUNT+CENTER,3,0,0)
if (#20==0 || #20 == 2) { Break_Out(EXTRA) }

When I run it and enter 035, press OK the program stops as if I had pressed either Escape or selected the Cancel button. Looking at the Text Registers from the Help menu, I can see the register is set to 035. I had also wanted to limit input to 3 characters with the COUNT function but that is not working either.

 


Topic: Re: Dialog_Input_1 conditions (2 of 2), Read 12 times
Conf: Search and Replace
From: Christian Ziemski
Date: Sunday, March 08, 2009 05:33 PM

On 08.03.2009 21:41 vtech-search-replace Listmanager wrote:
> From: "LeRoy Stevens"
>
> I want a dialog box to get user input with the option of Cancel.
> Sample below. I thought this would be:
>
> #103=Dialog_Input_1(20,^` Met Conversion v1.0`, `Enter the ...`,
> `Example: 035 or 107.`, `??Source:`,
> `[&Ok]`,`[Cancel]`^,@(1),APP+COUNT+CENTER,3,0,0)
> if (#20==0 || #20==2) { Break_Out(EXTRA) }
>
> When I run it and enter 035, press OK the program stops as if
> I had pressed either Escape or selected the Cancel button.

The number of the pressed button is returned and stored in #103
and not in #20.


> I had also wanted to limit input to 3 characters with the COUNT

That doesn't work.