Avatar of oaktrees
oaktrees

asked on 

Autohotkey Script for Capitalization of Selected Text

Need an Autohotkey script that will work for Title Case capitalization, and reverse of selected text.

Found this, but can't seem to get it to work.

Nor any way for it to EXCLUDE a set of words like "the", to", "and", "from", "for".

I quickly solved the retyping problem:

+^k:: ; SHIFT+CTRL+K converts text to capitalized
  Clipboard := ""
  SendInput, ^c ;copies selected text
  ClipWait
  StringUpper Clipboard, Clipboard, T ; Title mode conversion
  SendInput %Clipboard%
Return
This Hotkey mostly fixes the all-caps text by converting every word to initial caps. However, I did need to revert some prepositions and connectors to lowercase as appropriate (e.g. And ⇒ and, For ⇒ for, To ⇒ to, etc)

What do you think is happening?

Many thanks!!

OT
Scripting Languages* HotkeysProgrammingProgramming Languages-OtherAutoHotkey

Avatar of undefined
Last Comment
Joe Winograd

8/22/2022 - Mon