Page 1 of 1

Upper Case

Posted: Jan 26th, ’23, 18:05
by krukovis
Hello!

Please tell me how to convert the selected text to uppercase.

Re: Upper Case

Posted: Jan 29th, ’23, 18:37
by Tom
Search the Library, there is a script available - Convert text to upper.

Re: Upper Case

Posted: Feb 6th, ’23, 18:51
by DVT
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!

Re: Upper Case

Posted: Feb 8th, ’23, 17:36
by krukovis
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?

Re: Upper Case

Posted: Feb 10th, ’23, 07:42
by Marko
New (+ Icon) > Library (Book Icon)

Re: Upper Case

Posted: Mar 14th, ’23, 09:31
by ShowGo_Shane
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