

InterviewSolution
Saved Bookmarks
1. |
Solve : flashing banner + user input in batch or vbs? |
Answer» <html><body><a href="https://interviewquestions.tuteehub.com/tag/hello-484176" style="font-weight:bold;" target="_blank" title="Click to know more about HELLO">HELLO</a> Guru,<br/>Is it possible to do this in batch or vbs on win2003:<br/>When users execute the <a href="https://interviewquestions.tuteehub.com/tag/file-11330" style="font-weight:bold;" target="_blank" title="Click to know more about FILE">FILE</a>, it will show a flashing welcome banner until users press any key, it then will go to the menu<br/><br/>Below is my sample code, but i got stock hope someone helps me<br/><br/>echo off<br/>:BANNER<br/>cls<br/>color c<br/>echo Welcome!<br/>sleep 1<br/>cls<br/>color e<br/>echo Welcome!<br/>sleep 1<br/>goto :BANNER<br/><br/>:MENU<br/>something.....<br/><br/><br/><br/><br/> Quote from: scriptsean on May <a href="https://interviewquestions.tuteehub.com/tag/26-242610" style="font-weight:bold;" target="_blank" title="Click to know more about 26">26</a>, 2010, 12:37:15 PM<blockquote>Hello Guru,<br/>Is it possible to do this in batch or vbs on win2003:<br/>When users execute the file, it will show a flashing welcome banner until users press any key, it then will go to the menu<br/><br/>Below is my sample code, but i got stock hope someone helps me<br/><br/>echo off<br/>:BANNER<br/>cls<br/>color c<br/>echo Welcome!<br/>sleep 1<br/>cls<br/>color e<br/>echo Welcome!<br/>sleep 1<br/>goto :BANNER<br/><br/>:MENU<br/>something.....<br/><br/></blockquote> <br/>Sleep doesn't work in batch.<br/><br/>Anyway, why do you want to do this? What purpose will it serve?<br/><br/>You might be able to do it using the "ping sleep work-around", but again, I don't really understand why you'd want to do this...<br/><br/>An explaination of the "ping sleep work-around":<br/><br/>Useing the ping command in the following way can effectively mimic the desired output of a "sleep" command<br/><br/>ping 1.1.1.1 -n 1 -w 1000<br/><br/>NOTES:<br/>1.1.1.1 <strong>MUST </strong> BE AN <strong>INVALID IP ON YOUR NETWORK</strong><br/>The number following "-w" is the number of milliseconds to "wait", therefore 1000 = 1 second, 5000 = 5 seconds.<br/>The "pinging 1.1.1.1 with ..." dialog <a href="https://interviewquestions.tuteehub.com/tag/still-653256" style="font-weight:bold;" target="_blank" title="Click to know more about STILL">STILL</a> displaysping 1.1.1.1 -n 1 -w 1000 > nul<br/><br/>will not display the "pinging 1.1.1.1 with..." part.</body></html> | |