KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: DVC does not have the method: Replace ()
Topic Summary: Here is a replacement
Created On: 01/27/2022 12:07 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 DVC does not have the method: Replace ()   - Edgar - 01/27/2022 12:07 PM  
 DVC does not have the method: Replace ()   - MikeJ - 01/27/2022 12:30 PM  
Keyword
 01/27/2022 12:07 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

argument$ = "re-creating the Replace () method"

CLI$ = ""

' here is what I am trying to accomplish:

'argument$ = Replace(argument$, " ", "_")

'argument$ = Replace(argument$, "-", "_")

 

' this is a solution:

length% = Len( argument$) 

increment% = 0

' I find it hard to believe that there is no For…Next, but…

Do

   letter$ = Mid$(argument$, increment%, 1)

   If letter$ = " " Or letter$ = "-" Then

      CLI$ = CLI$ & "_"

   Else

      CLI$ = CLI$ & letter$

   End If

   increment% = increment% + 1

Loop Until increment% = length%

' and, as proof, make sure that these keystrokes can go into a text field:

SendKeys CLI$



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

-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
32321 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 398 guests browsing this forum, which makes a total of 398 users using this forum.

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