Code: Select all
#If GetKeyState("LShift", "P")
NumpadIns:: ; LShift + Numpad0.
Clipboard =
Send ^c
ClipWait, 0
SendInput % Format("{Text}{:U}", Clipboard)
return
#If
Code: Select all
#If GetKeyState("LShift", "P")
NumpadIns:: ; LShift + Numpad0.
Clipboard =
Send ^c
ClipWait, 0
SendInput % Format("{Text}{:U}", Clipboard)
return
#If
Code: Select all
#If GetKeyState("LShift", "P")
NumpadIns:: ; LShift + Numpad0
Clipboard =
Send, {LShift Up}^c
ClipWait, 0
SendInput % Format("{Text}{:U}", Clipboard)
return
#If
Thank you. Apparently while the Shift key is held in Microsoft Word, some actions cannot be executed.Rohwedder wrote: ↑23 Sep 2022, 05:05Hallo,
try:Code: Select all
#If GetKeyState("LShift", "P") NumpadIns:: ; LShift + Numpad0 Clipboard = Send, {LShift Up}^c ClipWait, 0 SendInput % Format("{Text}{:U}", Clipboard) return #If
Code: Select all
#If GetKeyState("LShift", "P")
NumpadIns:: ; LShift + Numpad0
KeyHistory
When I used my original script (without the {LShift Up} command) in the system’s Notepad, the selected text was uppercased. But when I used the same script in Microsoft Word, the selected text was not uppercased. So I thought that Microsoft Word prevented the uppercasing of the text. I still do not understand why the original script works in Notepad but not in Microsoft Word.Rohwedder wrote: ↑24 Sep 2022, 03:16I don't think Microsoft Word is to blame but Microsoft Windows!
When the key combination LShift + Numpad0 is pressed, Autohotkey sees only the event NumpadIns was pressed and does not mask LShift. Try:Code: Select all
#If GetKeyState("LShift", "P") NumpadIns:: ; LShift + Numpad0 KeyHistory
Code: Select all
<+NumpadIns:: ; LShift + Numpad0.
Clipboard := ""
Send ^c
ClipWait, 0
SendInput % Format("{Text}{:U}", Clipboard)
return
Code: Select all
<+NumpadIns:: ; LShift + NumpadIns.