Upper Case

Share your favorite FastKeys commands
Post Reply
krukovis
Posts: 3
Joined: Jan 26th, ’23, 17:00

Post by krukovis » Jan 26th, ’23, 18:05

Hello!

Please tell me how to convert the selected text to uppercase.
User avatar
Tom
Posts: 786
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jan 29th, ’23, 18:37

Search the Library, there is a script available - Convert text to upper.
DVT
Posts: 9
Joined: May 6th, ’20, 18:13

Post by DVT » Feb 6th, ’23, 18:51

Go into your FastKeys settings and do the following.

Shortcuts > New (+ Icon) > Library (Book Icon) > Command > Utility > Convert Text to Upper.

Then add in your custom shortcut and click "OK" to save. Hope this helps!
krukovis
Posts: 3
Joined: Jan 26th, ’23, 17:00

Post by krukovis » Feb 8th, ’23, 17:36

Tom wrote: Jan 29th, ’23, 18:37 Search the Library, there is a script available - Convert text to upper.
Can you tell me where the library is?
User avatar
Marko
Posts: 1714
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Feb 10th, ’23, 07:42

New (+ Icon) > Library (Book Icon)
ShowGo_Shane
Posts: 1
Joined: Jan 1st, ’23, 12:33

Post by ShowGo_Shane » Mar 14th, ’23, 09:31

Here's some code from a couple default FK scripts.
I'll just offer them up here. Unfortunately, I'm not at the point where I can offer any insight - but I can just provide what I see here...

❶ | 'Capitalize Text if last character is CAPs' - is the Description provided | Shift + Alt + F12

CODE: SELECT ALL
Send, {Home}+{End}
Old:=Clipboard
Clipboard:=""
Send, ^c
ClipWait 1
Clipboard=%Clipboard%
char:=SubStr(Clipboard, 0)
if char is upper
StringUpper Clipboard, Clipboard
Send %Clipboard%
Sleep 500
Clipboard:=Old



❷ | [New Type: Command] | [Shortcut= Ctrl + CapsLock] | Description: Change Selected & Highlighted Text |

Menu Case, Add
Menu Case, DeleteAll
Menu Case, Add, &UPPERCASE, CCase
Menu Case, Add, &lowercase, CCase
Menu Case, Add, &Title Case, CCase
Menu Case, Add, &Sentence case, CCase
Menu Case, Add
Menu Case, Add, &Fix Linebreaks, CCase
Menu Case, Add, &Reverse, CCase
Menu Case, Add
Menu Case, Add, &Remove Spaces, CCase

GetText(Txt)
If NOT ERRORLEVEL
Menu Case, Show
Return

CCase:
p:=A_ThisMenuItemPos
If (p=1)
StringUpper, Txt, Txt
Else If (p=2)
StringLower, Txt, Txt
Else If (p=3)
StringLower, Txt, Txt, T
Else If (p=4)
{
StringLower, Txt, Txt
Txt := RegExReplace(Txt, "((?:^|[.!?]\s+)[a-z])", "$u1")
}
Else If (p=6)
{
Txt := RegExReplace(Txt, "\R", "`r`n")
}
Else If (p=7)
{
Temp2 =
StringReplace, Txt, Txt, `r`n, % Chr(29), All
Loop Parse, Txt
Temp2 := A_LoopField . Temp2
StringReplace, Txt, Temp2, % Chr(29), `r`n, All
}
Else If (p=9)
{
Loop
{
StringReplace, Txt, Txt, %A_Space%%A_Space%, %A_Space%, UseErrorLevel
if ErrorLevel = 0
break
}
}
PutText(Txt)
Return

GetText(ByRef MyText = "")
{
SavedClip := ClipboardAll
Clipboard =
Send ^{vk43} ;Ctrl C
ClipWait 0.5
If ERRORLEVEL
{
Clipboard := SavedClip
MyText =
Return
}
MyText := Clipboard
Clipboard := SavedClip
Return MyText
}

PutText(MyText)
{
SavedClip := ClipboardAll
Clipboard =
Sleep 20
Clipboard := MyText
Send ^{vk56} ;Ctrl V
Sleep 100
Clipboard := SavedClip
Return
}

__________________________________

Hope this helps with a starting poing...
-S
Post Reply