I have a script that if I press and hold the LShift, it converts selected text from lowercase to all caps and paste an exclamation mark at the end of the text (TEXT!), and finally makes the first letter of the next word as a capital letter (TEXT! Text). If I press the LShift and releases it, it just converts selected text from lowercase to all caps with an exclamation mark (TEXT!)
Code: Select all
*LShift::
;(and ⇒ AND!)
KeyWait, LShift, T0.20
if (ErrorLevel = 1){
Clipboard := ""
SendInput, ^c
ClipWait
StringUpper Clipboard, Clipboard
clipboard=%clipboard%
SendInput %clipboard%{!} ` ;clipboard and space
; Selects word to the right and upper case
Clipboard := "" ; Clears the Clipboard
SendInput ^+{Right}
Sleep, 10
SendInput ^c
ClipWait 0 ;pause for Clipboard data
StringUpper, Clipboard, Clipboard, T ; Cap first char (Title)
SendInput %Clipboard%
}
else
{
;(and ⇒ AND)
Clipboard := ""
SendInput, ^c
ClipWait
StringUpper Clipboard, Clipboard
SendInput %Clipboard%
}
return