upper,- lowercase + capitalized txt conversions

how to:
•copy your text •the ctrl + X trigger will paste the converted text on the cursor position

^u::  ; or ~ctrl & u::                                               ; Convert text to upper
 StringUpper Clipboard, Clipboard
 Send %Clipboard%
RETURN

^l::                                                                 ; Convert text to lower
 StringLower Clipboard, Clipboard
 Send %Clipboard%
RETURN

^k::                                                                ; Convert text to capitalized
 StringUpper Clipboard, Clipboard, T
 Send %Clipboard%
RETURN

Copying + pasting with only one shortcut  → replaces the original string

^l::      ;= ctrl + L                                                               
 Convert_Lower()
RETURN
Convert_Lower()
{
 Clip_Save:= ClipboardAll                                          
 Clipboard:= ""                                                          
 Send ^c{delete}                                                      
 StringLower Clipboard, Clipboard                                    
 Send %Clipboard%                                                      
 Len:= Strlen(Clipboard)
 Send +{left %Len%}                                                    
 Clipboard:= Clip_Save                                                
}

Uppercase    replace all* Lower with Upper
Capitalized   replace all* Lower with Upper  and change Clipboard, Clipboard to Clipboard, Clipboard, T

code src  → autohotkey.com/board/topic/24431-convert-text-uppercase-lowercase-capitalized-or-inverted/#entry158152

*via Ctrl + H

 

Leave a Reply