KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Help with using SendKeys for longish text
Topic Summary:
Created On: 10/07/2021 11:21 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Help with using SendKeys for longish text   - bobe - 10/07/2021 11:21 AM  
 Help with using SendKeys for longish text   - R. Wilke - 10/07/2021 11:28 AM  
 Help with using SendKeys for longish text   - Edgar - 10/07/2021 11:39 AM  
 Help with using SendKeys for longish text   - dilligence - 10/07/2021 01:30 PM  
 Help with using SendKeys for longish text   - bobe - 10/07/2021 05:02 PM  
Keyword
 10/07/2021 11:39 AM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1284
Joined: 04/03/2009

This should* work:

 

Sub Main

Dim words() As String' dimension a string array

Dim dictation As String

Dim k As Integer

 

dictation = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum"

words = Split(dictation, " ")

For k = 0 To UBound(words)

      SendKeys words(k) & " ", 1

Next

End Sub

 

*Might fail if dictation includes any of: carriage return, line feed, new line, new paragraph; I have not tested this code



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

-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
32358 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 363 guests browsing this forum, which makes a total of 363 users using this forum.

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