KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: WSR Macros - Need 'times=' attribute in listenForList
Topic Summary: need scripting help!
Created On: 08/26/2020 06:33 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 WSR Macros - Need 'times=' attribute in listenForList   - IceRafter - 08/26/2020 06:33 PM  
 WSR Macros - Need 'times=' attribute in listenForList   - IceRafter - 08/31/2020 11:31 PM  
 08/26/2020 06:33 PM
User is offline View Users Profile Print this message

Author Icon
New Member

Posts: 10
Joined: 01/11/2019

Greetings all,

Have developed a nifty format for writing self-documenting WSR scripts based on the subject program's pull-down menu picks, using a simple executor routine dependent on a listenForList I/O table.

Works great, except for one little exception, namely when the menu pick does not have an associated hotkey. In such case I need to use the XML down tag {down} some variable number of times.  Currently I'm just hard-coding all the required tags in the I/O table property, see example below.

Can't figure an elegant way to use the SendKeys 'times=' attribute to clean this up. Anyone have any ideas? Yes, I know about and use both Dragon and KnowBrainer, I specifically want to use WSR Macros to accomplish this.

  • Idea #1: Can the listenForList have multiple properties? If so perhaps I could pass the repeat loop index to the executor function. But can't seem to find any documentation supporting that.
  • Idea #2: Call a VBS subscript for the down tag repeat loop from within the listenForList property. Is that possible? Anyone have an example of how to do that?
  • or perhaps something else?

Thanks in advance!


<!-- FILE menu exec -->
<command priority="110">
<appIsInForeground processName="notepad++.exe"/>

<!-- FILE menu IO -->
<listenForList name="fileOption" propname="itemNo" useSubset="true">
<item propval="{{alt}}f">                                                                                                              file menu</item>
<item propval="{{alt}}fn">                                                                                                              new</item>
<item propval="{{alt}}fo">                                                                                                              open</item>
<item propval="{{alt}}fr">                                                                                                              reload from disk</item>
<item propval="{{alt}}fs">                                                                                                              save</item>
<item propval="{{alt}}fa">                                                                                                              save as</item>
<item propval="{{alt}}fv">                                                                                                              save all</item>
<item propval="{{alt}}f{down 2}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}">                                             close</item>
<item propval="{{alt}}f{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}">                                       close all</item>
<item propval="{{alt}}f{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{enter}">                          close more</item>


Ice Rafter

 08/31/2020 11:31 PM
User is offline View Users Profile Print this message

Author Icon
New Member

Posts: 10
Joined: 01/11/2019

Well evidently, no one has any quick and easy solutions. For the time being I am 'working around', using the verbose method shown above. Will check back periodically.

Thanks in advance for your time and consideration.

Ice Rafter
31981 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 1 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 482 guests browsing this forum, which makes a total of 483 users using this forum.

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