KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Check all the boxes at once...
Topic Summary:
Created On: 03/24/2021 09:01 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Check all the boxes at once...   - Fmen - 03/24/2021 09:01 AM  
 Check all the boxes at once...   - Alan Cantor - 03/24/2021 11:18 AM  
 Check all the boxes at once...   - Fmen - 03/24/2021 12:20 PM  
 Check all the boxes at once...   - Edgar - 03/24/2021 12:28 PM  
 Check all the boxes at once...   - Fmen - 03/24/2021 03:03 PM  
 Check all the boxes at once...   - Edgar - 03/24/2021 04:50 PM  
 Check all the boxes at once...   - Matt_Chambers - 03/24/2021 12:45 PM  
 Check all the boxes at once...   - Alan Cantor - 03/24/2021 04:38 PM  
Keyword
 03/24/2021 09:01 AM
User is offline View Users Profile Print this message

Author Icon
Fmen
Senior Member

Posts: 110
Joined: 08/17/2015

Is there an easier way to check all 30 boxes on an Internet Explorer page other than the excrutiatingly slow:

 x=0

Do Until x=30

SendKeys " {tab}"

x=x+1

Loop

 

 

 03/24/2021 11:18 AM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4348
Joined: 12/08/2007

Try replacing SendKeys with SendDragonkeys or SendSystemKeys.

The code will probably run faster as a DVC command, although the syntax might be a little different.

 03/24/2021 12:20 PM
User is offline View Users Profile Print this message

Author Icon
Fmen
Senior Member

Posts: 110
Joined: 08/17/2015

Will do. Problem is the shear number of boxes. I was hoping for something like HeardWord "check", "all", "the", "boxes" or a vbs script alternative...
 03/24/2021 12:28 PM
User is offline View Users Profile Print this message

Author Icon
Edgar
Top-Tier Member

Posts: 1276
Joined: 04/03/2009

I do this with a for loop and a list (1-5000) to control the number of iterations. 5000 might seem like a lot but I use two different applications which manage a database of over 500,000 items. A couple of hundred iterations are virtually instantaneous, a couple of thousand - maybe two seconds but most of that is redrawing time.

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

-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

 03/24/2021 03:03 PM
User is offline View Users Profile Print this message

Author Icon
Fmen
Senior Member

Posts: 110
Joined: 08/17/2015

Originally posted by: Edgar I do this with a for loop and a list (1-5000) to control the number of iterations. 5000 might seem like a lot but I use two different applications which manage a database of over 500,000 items. A couple of hundred iterations are virtually instantaneous, a couple of thousand - maybe two seconds but most of that is redrawing time.

 

Would you be able to provide an example. How is my loop different from yours that makes it so much faster? Thanks in advance.

 03/24/2021 04:50 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: Fmen
Originally posted by: Edgar I do this with a for loop and a list
 

 

Would you be able to provide an example. How is my loop different from yours that makes it so much faster?

Sub Main
   For increment = 1 To Val (ListVar1)
      SendKeys "{Down}", 1
      SendKeys "{Space}", 1
   Next increment   
End Sub


Alan also seems to be using a for loop. You are using a do until loop. As with Alan, I also have to start with the first box ticked. I'm not really sure about how Basic handles for loops and do loops but I suspect that for loops are more commonly used and might have gotten some optimization. The other possibility is that we have faster hardware <shrug>.



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

-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

 03/24/2021 12:45 PM
User is offline View Users Profile Print this message

Author Icon
Matt_Chambers
Top-Tier Member

Posts: 582
Joined: 08/09/2018

In DPI 15.61, a script like this using SendKeys works just great, faster than SendDragonKeys and just as fast as a DVC command. In earlier versions of Dragon, Alan's advice is absolutely right.
 03/24/2021 04:38 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4348
Joined: 12/08/2007

Two or three times a year, I'm tasked with checking thousands of checkboxes on a webpage.

Rather than using a voice command, I use a Macro Express script. I manually do the first checkbox, and then run the macro. It begins by asking how many checkboxes to check. Even when I specify thousands, the script executes almost instantaneously.

Here's what the script looks like:

Variable Set Integer %Num%: Prompt
Repeat Start (Repeat %Num% times)
Text Type (Simulate Keystrokes): <TAB>
Text Type (Simulate Keystrokes): <SPACE>
End Repeat

It would be easy enough to implement something like this in Advanced Scripting, although input boxes appear to be broken in Windows 10. I find that input boxes only occasionally receive focus when Dragon creates them.



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

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