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
  • 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

  • Hi Arnaud,

    Thank you for your script to convert a whole segment to capital letters but I seem to have a problem.

    All letters are capitalized but a few in between, most of the time about the same area of the sentence i.e a few letters after the first word or after a few letters within the first word, and regardless of whether the segment contains accents or not (I translate into French).

    For example "Supprimer tous les utilisateurs" would give "SUPPrimer TOUS LES  UTILISATEURS". Any idea why such behaviour? :)  

Reply
  • Hi Arnaud,

    Thank you for your script to convert a whole segment to capital letters but I seem to have a problem.

    All letters are capitalized but a few in between, most of the time about the same area of the sentence i.e a few letters after the first word or after a few letters within the first word, and regardless of whether the segment contains accents or not (I translate into French).

    For example "Supprimer tous les utilisateurs" would give "SUPPrimer TOUS LES  UTILISATEURS". Any idea why such behaviour? :)  

Children