uppercase.ahk 642 B

1234567891011121314151617181920212223
  1. MenuString =
  2. (
  3. Press:
  4. 1 - Title Case
  5. 2 - UPPER CASE
  6. 3 - lower case
  7. 4 - Sentence case
  8. any else - Cancel
  9. )
  10. ^u:: ; Ctrl-u to activate
  11. Send ^c
  12. ToolTip %MenuString%
  13. Input Key, I L1,,1,2,3,4
  14. IfEqual Key, 1, StringUpper Clipboard, Clipboard, T ; Title Case
  15. IfEqual Key, 2, StringUpper Clipboard, Clipboard ; UPPER CASE
  16. IfEqual Key, 3, StringLower Clipboard, Clipboard ; lower case
  17. IfEqual Key, 4 ; Sentence case
  18. Clipboard := RegExReplace(Clipboard,"(\w)([^?.:!]*)","$U1$L2")
  19. IfEqual ErrorLevel, Match, Send ^v
  20. ToolTip
  21. return
  22. #notrayicon