Convert select word to capitalized or lowercase

Press Alt+X to activate

For this to work, the cursor must be right before, on or right after the word to be capitalized.


!x:: ; Convert word to capitalized or lowercase
Send {Right}
Send ^{Left}
Send +{Right}
Sleep 100
Send ^c
Sleep 200
Send +{F3}
Return

Parents Reply
  • For a whole segment to uppercase/lowercase, you need to select all manually. So adding
    Send, ˆa
    as second line solves the problem :)

    So, I propose this code for many ways of converting :

     

    !x:: ; Alt X Convert word to capitalized or lowercase
    Send {Right}
    Send ^{Left}
    Send +{Right}
    Sleep 100
    Send ^c
    Sleep 200
    Send +{F3}
    Return

    ^l:: ; Ctrl L Convert segment to lowercase 1
    Send, ^a
    Send, ^c
    Send, {Del}
    Stringlower Clipboard, Clipboard
    Send %Clipboard%
    Return

    !l:: ; Alt L Convert word to lowercase
    Send, ^{Right}+^{Left}
    Send, ^c
    Send, {Del}
    Stringlower Clipboard, Clipboard
    Send %Clipboard%
    Return

    ^u:: ; Ctrl u Convert segment to capitalized
    Send, ^a
    Send, ^c
    Send, {Del}
    StringUpper Clipboard, Clipboard
    Send %Clipboard%
    Return

    !u:: ; Alt u Convert word to capitalized
    Send, ^{Right}+^{Left}
    Send, ^c
    Send, {Del}
    StringUpper Clipboard, Clipboard
    Send %Clipboard%
    Return

Children