Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for twirly.bat

(view source code of twirly.bat as plain text)

  1. @ECHO OFF
  2. REM By Brian Williams
  3. REM hieyeque1@gmail.com
  4.  
  5. SETLOCAL ENABLEEXTENSIONS
  6. SETLOCAL ENABLEDELAYEDEXPANSION
  7.  
  8. CALL :GETCR
  9. CALL :TWIRLY
  10. GOTO :END
  11.  
  12. :TWIRLY
  13. SET _SPINNERS=7
  14. SET _SPIN=30
  15. SET /P _DUM =Check this out   ...!_CR!<NUL
  16. PING 127.0.0.1>NUL
  17. SET /P _DUM =Who hoo...........................                               !_CR!<NUL
  18. FOR /L %%A IN (1,1,!_SPINNERS!) DO (
  19. 	SET _PIPE=!_PIPE!^|
  20. 	SET _SLASH=!_SLASH!/
  21. 	SET _DASH=!_DASH!-
  22. 	SET _WHACK=!_WHACK!\
  23. 	FOR /L %%B IN (1,1,!_SPIN!) DO (
  24. 		FOR %%C IN (^!_PIPE! !_SLASH! !_DASH! !_WHACK!) DO (
  25. 			SET /P _DUM=Spin'em -----------------------------------           %%C!_CR!<NUL
  26. 			PING 127.0.0.1 -n 1 >NUL
  27. 			PING 127.0.0.1 -n 1 >NUL
  28. 		)
  29. 	)
  30. )
  31. ECHO Ok, that's enough.                                                         
  32. PING 127.0.0.1>NUL
  33. GOTO :EOF
  34.  
  35.  
  36. :GETCR
  37. rem subroutine returns a variable called _cr that contains the carriage return
  38. FOR /F "TOKENS=*" %%A IN ('IPCONFIG') DO (
  39. 	SET _CR=%%A
  40. )
  41. SET _CR=!_CR:~-1!
  42. GOTO :EOF
  43.  
  44. :END

page last modified: 2024-04-16; loaded in 0.0057 seconds