I use INPUTBOX to request a number to be entered by the user, which is stored in the variable <MyCnter>. If the user makes no input, the variable <MyCnter> should be filled with the default value 1.
Populating DefaultData with 1 doesn't seem to work, since I output an MSG with the variable <MyCnter> after the INPUTBOX. IF an input is made, it shows up in the MSG output as well.
What am I doing wrong or have I not understood?
Thanks for any support.
Regards,
Uli
Default value for a variable
Re: Default value for a variable
When using MSG in the Default Data field, add [x], where x - it's a default data.
Re: Default value for a variable
Leo, thank you very much for your answer.
Unfortunately, I do not understand it. Perhaps I have not formulated my request precisely.
So: I want to know from the user via INPUTBOX how many instances he wants to install. I store his answer in the variable <MyCnter>. If he makes no input here, <MyCnter> should take a default value of 1. In the next step I output a window with the command MSG. In this window the variable <MyCnter> (which contains the user input OR the default value of 1) is displayed.
The problem now is that I can't see a default value (value: 1) at MSG when the user didn't made any input.
What am I doing wrong?
Thanks already once for your efforts.
Kind regards,
Uli
Translated with http://www.DeepL.com/Translator (free version)
Unfortunately, I do not understand it. Perhaps I have not formulated my request precisely.
So: I want to know from the user via INPUTBOX how many instances he wants to install. I store his answer in the variable <MyCnter>. If he makes no input here, <MyCnter> should take a default value of 1. In the next step I output a window with the command MSG. In this window the variable <MyCnter> (which contains the user input OR the default value of 1) is displayed.
The problem now is that I can't see a default value (value: 1) at MSG when the user didn't made any input.
What am I doing wrong?
Thanks already once for your efforts.
Kind regards,
Uli
Translated with http://www.DeepL.com/Translator (free version)
Re: Default value for a variable
In this case you need two entries in Variables:
1.
Variable: <MyCnter>
Reg Key: INPUTBOX
Reg Value: your text
Default Data: 1
2.
Variable: <MyCnter2>
Reg Key and Reg Value leave empty
Default Data: MSG(your text <MyCnter>)
1.
Variable: <MyCnter>
Reg Key: INPUTBOX
Reg Value: your text
Default Data: 1
2.
Variable: <MyCnter2>
Reg Key and Reg Value leave empty
Default Data: MSG(your text <MyCnter>)
Re: Default value for a variable
Thank you for your response, Leo.
I already used those 2 variabels as you suggested, but the second variable (<MyCnter2>) does not show up in the MSG (windows) the content of <MyCnter> with the Deault value '1' if nothing (= left blank) is entered in INPUTBOX with <MyCnter>.
If I am entering any number in the INPUTBOX dialog this number is shown in the MSG.
The expected default value of '1' for <MyCnter> seems to be lost when displaying with MSG (your text <MyCnter>) as there is no content displayed with(in) <MyCnter>.
Any idea?
I already used those 2 variabels as you suggested, but the second variable (<MyCnter2>) does not show up in the MSG (windows) the content of <MyCnter> with the Deault value '1' if nothing (= left blank) is entered in INPUTBOX with <MyCnter>.
If I am entering any number in the INPUTBOX dialog this number is shown in the MSG.
The expected default value of '1' for <MyCnter> seems to be lost when displaying with MSG (your text <MyCnter>) as there is no content displayed with(in) <MyCnter>.
Any idea?