Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for lockrand.js

(view source code of lockrand.js as plain text)

  1. var WshShell = WScript.CreateObject( "WScript.Shell" );
  2. counter = 0;
  3. do
  4. {
  5. 	rnd = Math.floor( 3 * Math.random( ) + 1 );
  6. 	switch ( rnd ) {
  7. 		case 1:
  8. 			WshShell.SendKeys( "{CAPSLOCK}" );
  9. 		case 2:
  10. 			WshShell.SendKeys( "{SCROLLLOCK}" );
  11. 		default:
  12. 			WshShell.SendKeys( "{NUMLOCK}" );
  13. 	}
  14. 	WScript.Sleep( 100 );
  15. 	counter = counter + 1;
  16. }
  17. while ( counter < 150 );
  18.  

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