KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Lowercase/uppercase <text>
Topic Summary: How can I find/write a command like that?
Created On: 04/13/2019 03:24 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Lowercase/uppercase <text>   - missink - 04/13/2019 03:24 PM  
 Lowercase/uppercase <text>   - R. Wilke - 04/13/2019 03:47 PM  
 Lowercase/uppercase <text>   - missink - 04/13/2019 05:51 PM  
 Lowercase/uppercase <text>   - locution - 04/13/2019 08:06 PM  
 Lowercase/uppercase <text>   - Alan Cantor - 04/13/2019 10:34 PM  
 Lowercase/uppercase <text>   - Edgar - 04/14/2019 12:57 PM  
 Lowercase/uppercase <text>   - Lunis Orcutt - 04/14/2019 02:06 PM  
 Lowercase/uppercase <text>   - missink - 04/19/2019 04:41 PM  
 Lowercase/uppercase <text>   - locution - 04/19/2019 05:06 PM  
 Lowercase/uppercase <text>   - PG LTU - 04/19/2019 06:36 PM  
 Lowercase/uppercase <text>   - Scribe - 05/23/2019 11:56 AM  
 Lowercase/uppercase <text>   - PG LTU - 05/23/2019 02:35 PM  
Keyword
 04/14/2019 12:57 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1260
Joined: 04/03/2009

Sub Main

Dim lowerCase As String

Dim upperCase As String

 

lowerCase = LCase (ListVar1)

MsgBox lowerCase

upperCase = UCase (ListVar1)

MsgBox upperCase

End Sub

The above is a proof of concept I call it "Test <dictation>"; I made it a global command. The next step would be to adapt to the code to your needs; I would probably create 2 new global commands:
Capitalize All <dictation>

Lowercase All <dictation>

a single command might look like:

list: "scules" with the contents:

Lowercase

Capitalize

and the command would be:
<scules> All <dictation>


Capitalize All <dictation>

would look like:

Sub Main

Dim upperCase As String

 

upperCase = " " & UCase (ListVar1) & " "

' somewhere on the forum is code for inserting smart spaces

' I didn't bother to use it in the above and if being lazy I would use:

' upperCase = UCase (ListVar1)

' and manage the leading and trailing spaces in dictation

SendKeys upperCase , 1

End Sub



-------------------------

-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

Statistics
32287 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 1 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 353 guests browsing this forum, which makes a total of 354 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.