Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for capsoff.kix

(view source code of capsoff.kix as plain text)

  1. $Msg = "CapsOff.kix,  Version 1.01@CRLF"
  2. $Msg = $Msg + "Checks if CapsLock is ON, and if so, toggles it OFF again"
  3. $Msg = $Msg + "@CRLF@CRLF"
  4. $Msg = $Msg + "Usage:	KIX32.EXE  CapsOff.kix  [ $$Help=1 ]@CRLF@CRLF"
  5. $Msg = $Msg + "Note:	This script only works in a console window,"
  6. $Msg = $Msg + "@CRLF"
  7. $Msg = $Msg + "     	(KIX32.EXE) not in GUI mode (WKIX32.EXE)"
  8. $Msg = $Msg + "@CRLF@CRLF"
  9. $Msg = $Msg + "Written by Rob van der Woude@CRLF"
  10. $Msg = $Msg + "http://www.robvanderwoude.com"
  11.  
  12. If UCase( @ScriptExe ) = "KIX32.EXE"
  13. 	If $Help = ""
  14. 		$WindowTitle = "CapsLock test"
  15. 		$RC = SetOption( "CaseSensitivity", "ON" )
  16. 		$RC = SetConsole( "SHOW" )
  17. 		$RC = SetTitle( $WindowTitle )
  18. 		$RC = SetFocus( $WindowTitle )
  19. 		$RC = SendKeys( "q" )
  20. 		Get $Key
  21. 		If $Key = "Q"
  22. 			"Capslock is ON, toggling it OFF again...@CRLF"
  23. 			$RC = SendKeys( "{CAPSLOCK}" )
  24. 		EndIf
  25. 		$RC = SetOption( "CaseSensitivity", "OFF" )
  26. 	Else
  27. 		? "$Msg@CRLF"
  28. 	EndIf
  29. Else
  30. 	$RC = MessageBox( $Msg, "CapsOff", 64, 60 )
  31. EndIf
  32.  

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