![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Multiple Steps in If Then Statement Topic Summary: Created On: 11/28/2020 10:08 PM Status: Post and Reply |
|
![]() |
![]() |
- Todachen | - 11/28/2020 10:08 PM |
![]() |
![]() |
- Todachen | - 11/28/2020 10:51 PM |
![]() |
![]() |
- Edgar | - 11/29/2020 11:26 AM |
![]() |
![]() |
- Todachen | - 12/24/2020 10:37 PM |
![]() |
![]() |
- Edgar | - 12/25/2020 11:19 AM |
![]() |
![]() |
- Todachen | - 12/29/2020 02:51 PM |
![]() |
![]() |
- Todachen | - 11/29/2020 10:35 PM |
![]() |
![]() |
- Mav | - 11/30/2020 02:17 AM |
![]() |
![]() |
- Todachen | - 11/30/2020 05:07 PM |
![]() |
![]() |
- PG LTU | - 12/29/2020 02:58 PM |
![]() |
|
Hi everybody,
'#Language "WWB-COM" Option Explicit Sub Main SendKeys "{end}~" Wait 0.1 SendKeys "SendKeys """ Wait 0.1 SendKeys """ Wait 0.1 SendKeys "~" Wait 0.1 SendKeys "Wait .1" Wait 0.1 SendKeys "{left}{up}{end}{left}" Wait 0.1 End Sub
If ListVar1 = "insert SendKeys" Then SendKeys "{end}~" Wait 0.1 SendKeys "SendKeys """ Wait 0.1 SendKeys """ Wait 0.1 SendKeys "~" Wait 0.1 SendKeys "Wait .1" SendKeys "{Left}{up}{End}{Left}""
So as you can see I've tried to take the multiple steps above and put them onto one line in the if then statement above.
I have a feeling that I need to figure out how to better use the multiple step recursive routines that we have discussed in this forum, in order to be able to make this work in a list. But I currently lack the experience and knowledge necessary to figure out how to wrap multiple steps into a listing command.
Any advice would be greatly appreciated. :-) ------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
I should also add that I have attempted to add in the wait code using the "wait" attribute (I think that's the correct word for it) of the SendKeys script as is described in the literature provided by Nuance at the following website:
An expression that returns a numeric result. Use &O to express an octal number. Use &H to express a hex number"
Has anybody played with this "wait" attribute, and does anybody know how to make it work. If I'm understanding, I think I should be able to pull off the multistep if then statement described in the previous message if there is a way I can figure out how to make the system wait using this attribute in between keystrokes. ------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
XXX = 0 If XXX = 0 Then MsgBox "XXX = 0" Wait 0.1' superfluous statement ' just show you can see how SendKeys "{Home}", 1'SendKeys using the optional Wait parameter ElseIf XXX > 0 Then MsgBox "XXX > 0" ElseIf XXX < 0 Then MsgBox "XXX < 0" Else TTSPlayString "Unrecognized value!" Wait 2.5 MsgBox "unrecognized value" Exit All End If ------------------------- -Edgar |
|
|
|
![]() |
|
Thanks again for this Edgar.
I'm wondering if you know of any disadvantages to using the wait parameter at the end of the SendKeys line. Seems to me that that's an easier way to do it then coding a separate Wait line below the SendKeys line, which seems to be the way that most people prefer to do it.
------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
I ALWAYS add the optional value; here is my macro for building an "empty" SendKeys line: However, I expect that, by this stage of the game, Nuance has probably made the default value "true"/"1" - and if not, why not? I can think of absolutely no situation (given the current state of hardware) where one might want to consider processing additional statements while SendKeys is outputting characters. ------------------------- -Edgar |
|
|
|
![]() |
|
Hello again Edgar, Sub Main SendKeys "_", 3 SendKeys "{BS}" End Sub
------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
Thank you Edgar. I will take a look at this and see if I can figure it out.
------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
Todachen, since you want to start writing your own scripts, I think it's really essential for you to learn the basics of VBA. There's a myriad of tutorials out there making the process a lot less painful than asking in this forum for elementary language constructs. For example, wikibooks has an overview of the commands and control structures: BASIC Programming - Wikibooks, open books for an open world
hth, mav |
|
|
|
![]() |
|
Thank you for the tip :-) I will check that out. ------------------------- My voice computer: W10/DPI 15.6/KB2017/VC 2020 on a Intel Core i7-8559U CPU @ 2.70GHz, 16gb DDR4, Sennheiser ME 3D 431 II / Roccat Juke – ROC-14-11-AM |
|
|
|
![]() |
|
Sorry, you mis-understood. The value is not "seconds" (or even "milliseconds") but rather a Boolean, that is either: true (1) or false (0), value only. The period of time is until the cpu reports the "send" is done.
-------------------------
|
|
|
FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.