KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: How to write a command for making the mouse triple-click, and how to have multiple "SendKeys" parts in the same "if ListVar1" line? (or another way to do this)
Topic Summary:
Created On: 02/10/2022 11:45 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 02/10/2022 11:45 AM
User is offline View Users Profile Print this message

Author Icon
brainerfan
New Member

Posts: 12
Joined: 10/03/2021

Noticed ButtonClick 1,3 (which I used way back) doesn't work when making commands in Dragon, and gives me an error. How would I do this?

 

I'm using it in something like this:

 

if ListVar1 = "testing" then ButtonClick 1,1 then SendKeys "^s"

 

...But I don't know how to add more than one "SendKeys" macro after the "then" part (and something like "if ListVar1 = "testing" then SendKeys "^s" then Wait 0.1 then ButtonClick 1,1 then SendKeys "^f"" doesn't work).

 

Is there a way to add multiple series of "SendKeys" (including "Wait" parts) in an if ListVar1 command? If so, how would I do this?



 02/10/2022 07:01 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39967
Joined: 10/01/2006

Have you tried dumbing it down with something like the following:

 

Sub Main

ButtonClick 1,3 'we don't know what this does 

Wait 0.1

SendKeys "^s"

Wait 0.1

ButtonClick 1,1

Wait 0.1

SendKeys "^f"

End Sub



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

Change "No" to "Know" w/KnowBrainer 2020
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1

 02/11/2022 07:19 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

Originally posted by: brainerfan Noticed ButtonClick 1,3 (which I used way back) doesn't work when making commands […] 

 

if ListVar1 = "testing" then ButtonClick 1,1 then SendKeys "^s"

 

 

 

 

...But I don't know how to add more than one "SendKeys" macro after the "then" part

You should probably learn where the documentation is for Dragon®’s Basic:

https://www.nuance.com/products/help/dragon/dragon-for-pc/scriptref/Content/vbs/speechlinks_basic_language.htm

The format for the complex (multiple statements after then) if/then statement is:

If ListVar1 = "testing" Then

' do all the things that you need to do

     ButtonClick 1, 1

     ButtonClick 1, 1

     ButtonClick 1, 1

' do it three times in a row if

' ButtonClick 1, 3

' is not accepted (I don't recall it ever being acceptable)

' you could also do:

    ' ButtonClick 1, 2

     ' ButtonClick 1, 1

     SendKeys "^s", 1

End If

 



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

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

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