I just got some code to do this effect, but I need to it to type faster, like a letter every half a second.
for %%i in (h e l l o o o o o o o o o o o o o o) do (
set /p a=%%i<nul
ping 0.0.0.0 -n 2.0>nul 2>&1
)
Can someone modify it so it types faster?
Just give a try for this code : Message Typewriter + Speaking Voice
Pinging
0.0.0.0
givesPING: transmit failed. General failure
error message nearly immediately.(Edited according to suggestive rojo's comment)
Better to ping some address returning
Request timed out
message chosen from a Private-Use Network range.Here:
a.b.c.d
= address returningRequest timed out
message, see (*) below.-4
= force using IPv4.-n 1
= number of echo requests to send (one).-w 500
= timeout in milliseconds to wait for each reply (500=1/2 sec); this should work to cca 5 seconds (approximate time for one unsuccesfull echo request).(*) The following IPv4 address ranges have been reserved by the
IANA
for private internets, and are not publicly routable on the global internet:The
ping
solution in the comments above is a worthwhile solution for computers with installed network interfaces (as almost all have).However, it appears that the minimum wait time recognized with this method is 500ms. If you change the 500 to a lower value, you still pause a half second between letters. If you want finer control, or if your computer has no network interface, you'll have to borrow from another runtime environment -- JScript, for example.
Note on the choice of IP to ping: For the
-w
switch to work as intended, the IP you ping must result in "Request timed out". You can use a non-existent LAN IP such as a 10.x.x.x or 192.168.x.x. But for widespread deployment, if you can't be certain that those ranges are unused, a link local IP in the range of 169.254 should work just fine for this purpose. Please do not use an IP in historical bogon space like 1.1.1.1 or 1.2.3.4. Just because such addresses don't reply doesn't mean your packets aren't adding to network congestion somewhere.Eventually as IPv4 addresses draw ever nearer to complete exhaustion, people need to be more conscientious of polluting the Internet with bogus traffic. It could be that 1.1.1.1 and 1.2.3.4 will never be useful to anyone because they are so often abused by casual scripters. But that's no reason to add to the mistreatment of those addresses. See this page for further reading, and please, save the bogons.
Jack.bat
Just to see how far I could take the typewriter effect, I wrote a script that outputs text similar to the X screensaver "Jack". It outputs the same line over and over, and randomly introduces typographical errors. Run it and you'll be mesmerized, rooting for the script to complete a line without any typos.