Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #12320
| From | "R.Wieser" <address@not.available> |
|---|---|
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Re: Waiting for keypress in a console - I've got problems. |
| Date | 2020-12-29 14:46 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <rsfbva$1fqu$1@gioia.aioe.org> (permalink) |
| References | (1 earlier) <XnsACA1AFCE66BAeejj99@194.109.6.166> <rsd40g$duc$1@gioia.aioe.org> <XnsACA239A93C13eejj99@194.109.6.166> <rselrk$1mc6$2@gioia.aioe.org> <XnsACA288B139002eejj99@194.109.6.166> |
Evertjan, > So if you type "abcd" + cr, > the .Read(1) will reas the "a" when the cr is entered. It does. However, outputting all read characters inside that loop displays all that have been typed. Which means that the buffer should be empty when the loop exits I did some more checking and it turns out that when the loop ends there are /two/ characters still in the buffer. Yup, a CR,LF pair - with seemingly both being recognised as AtEndOfLine characters. So just reading one last character was not enough to solve the problem, I needed to read two. But if I do that .... I will definitily get into troube when I redirect a file which uses single-character EOLs. IOW, not a good solution. > Would there be a timeout perhaps? I wish ! That would allow me to do something else too : looping thru some code as long as a specific key has not been pressed. Althoug the former is solved by using .ReadLine, there is no way to get the latter effect (a "no wait" check for a keypress). Oh well, I can always see if I can slap something together myself. :-) Thanks for the help. Regards, Rudy Wieser
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar
Waiting for keypress in a console - I've got problems. "R.Wieser" <address@not.available> - 2020-12-28 14:50 +0100
Re: Waiting for keypress in a console - I've got problems. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-12-28 17:16 +0100
Re: Waiting for keypress in a console - I've got problems. "R.Wieser" <address@not.available> - 2020-12-28 18:18 +0100
Re: Waiting for keypress in a console - I've got problems. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-12-29 00:21 +0100
Re: Waiting for keypress in a console - I've got problems. "R.Wieser" <address@not.available> - 2020-12-29 08:28 +0100
Re: Waiting for keypress in a console - I've got problems. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-12-29 13:26 +0100
Re: Waiting for keypress in a console - I've got problems. "R.Wieser" <address@not.available> - 2020-12-29 14:46 +0100
Re: Waiting for keypress in a console - I've got problems. JJ <jj4public@gmail.com> - 2020-12-29 11:44 +0700
Re: Waiting for keypress in a console - I've got problems. "R.Wieser" <address@not.available> - 2020-12-29 08:26 +0100
csiph-web