Advertisement
Najeebsk

ALPHABET-UP-LOW.ahk

Nov 25th, 2022 (edited)
1,420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; <COMPILER: v1.1.34.04>
  2. #NoEnv
  3. #SingleInstance, Force
  4. SetBatchLines, -1
  5. ;#NoTrayIcon
  6. SetWorkingDir %A_ScriptDir%  
  7. FileInstall , F:\APPS\ALPHABET-UP-LOW\ALPHABET-LEETER.ahk,ALPHABET-LEETER.ahk
  8. FileSetAttrib +H, %A_ScriptDir%\ALPHABET-LEETER.ahk, 2
  9. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  10. ;CTL+L - convert to lowercase
  11. ;CTL+U - convert to uppercase
  12. ;CTL+K - invert the case (e.g. "The Big Dog" becomes "tHE bIG dOG")
  13. ;SHIFT+CTL+K - convert to capitalized (e.g. "the big dog" becomes "The Big Dog")
  14. ;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  15. ^u::             ; Convert text to upper
  16.  StringUpper Clipboard, Clipboard
  17.  Send %Clipboard%
  18. RETURN
  19.  
  20. ^l::                ; Convert text to lower
  21.  StringLower Clipboard, Clipboard
  22.  Send %Clipboard%
  23. RETURN
  24.  
  25. +^k::               ; Convert text to capitalized
  26.  StringUpper Clipboard, Clipboard, T
  27.  Send %Clipboard%
  28. RETURN
  29.  
  30. ^k::                                                                 ; Convert text to inverted
  31.  Lab_Invert_Char_Out:= ""
  32.  Loop % Strlen(Clipboard) {
  33.     Lab_Invert_Char:= Substr(Clipboard, A_Index, 1)
  34.     if Lab_Invert_Char is upper
  35.        Lab_Invert_Char_Out:= Lab_Invert_Char_Out Chr(Asc(Lab_Invert_Char) + 32)
  36.     else if Lab_Invert_Char is lower
  37.        Lab_Invert_Char_Out:= Lab_Invert_Char_Out Chr(Asc(Lab_Invert_Char) - 32)
  38.     else
  39.        Lab_Invert_Char_Out:= Lab_Invert_Char_Out Lab_Invert_Char
  40.  }
  41.  Send %Lab_Invert_Char_Out%
  42. RETURN
  43. ;-=-=-=-=-=-=-=-=-=-=-=-=-=-HELP-=-=-=-=-=-=-=-=-=-=-=-=-=-
  44. ^H::
  45.     MsgBox, , About ALPHABET Lowercase Uppercase,
  46.     (
  47.         This program will ALPHABET Lowercase Uppercase, via hotkey.
  48.  
  49.         The defined hotkeys are:
  50.        CTL+L     - convert to lowercase
  51.         CTL+U    - convert to uppercase
  52.         CTL+K - invert the case (e.g. "The Big Dog" becomes "tHE bIG dOG")
  53.         SHIFT+CTL+K - convert to capitalized (e.g. "the big dog" becomes "The Big             Dog")        
  54.  
  55.         Works on both Windows XP and Windows 7
  56.         By Najeeb Shah Khan 2022
  57.     )
  58. Return
  59. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  60. #R::Reload  ;<--  ~ Reload Script ~
  61. #S::Suspend ;<--  ~ Suspend Script ~
  62. #P::Pause   ;<--  ~ Pause Script ~
  63. #M::WinMinimize, ;<--  ~ Minimize Script ~
  64. ESC::ExitApp     ;<--  ~ Exit Script ~
  65. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-END=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement