In the following snippet, echo is randomly activated (in this case on the fifth iteration):
@echo off
do index = 1 to 1000
:: disable audible beep for input
option //BeepLength = 0
echo ``
echo %index
delay 1
enddo
Loop, index, and delay are just to demonstrate the...
Right now you can get only one specified value back with @iniread which forces you to specify all keys for a section you want to retrieve. For my scripts I normally want all values for a section and use the keys as variable names. I suggest such a command which sets theses variables:
Example...
Rex suggested to post this here: inkey does not accept empty answers ("just Enter"). I'd like to have the same functionality (maybe a "minimum number of characters" option) for the input command.
Thorsten
1. The documentation for @select and @selectarray says "If the specified width is < 150 [...]" - yet neither select nor selectarray take a width parameter
2. @selectarray (and probably @select) don't work correctly when "ConsolePopupWindows=yes". Variables select_line and _select_key are not...
Actually I was mistaken: the error happened in an interactive script and I used TCC_RT as executing shell. That's why it didn't pick up the settings of my interactive shell. "option //BeepLength = 0" made the beep silent.
The documentation says "to disable all error beeps set the length and frequency to 0. If you do, the BEEP command will still be operable, but will not produce sound unless you explicitly specify the frequency and duration." Nevertheless inkey and input beep very loudly.
How can I make input and...
input and inkey accept empty answers ("just Enter") even when /k sets the valid keys ("input /k"::^[yn]$" Database type: %%database_type" for example). Is there a way to prohibit the empty answer?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.