KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Open Program
Topic Summary: Open 3 MS OneNotes at once.
Created On: 12/20/2021 04:09 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Open Program   - Robert Snow - 12/20/2021 04:09 PM  
 Open Program   - Alan Cantor - 12/20/2021 04:40 PM  
 Open Program   - Robert Snow - 12/20/2021 06:04 PM  
 Open Program   - Lunis Orcutt - 12/20/2021 06:48 PM  
 Open Program   - Robert Snow - 12/23/2021 02:07 PM  
 Verbal Command to open a OneNote notebook   - Robert Snow - 12/23/2021 04:11 PM  
 Open Program   - noblemd - 12/21/2021 01:00 PM  
 Open Program   - PG LTU - 12/21/2021 03:27 PM  
 Open Program   - Robert Snow - 12/23/2021 02:30 PM  
Keyword
 12/20/2021 04:09 PM
User is offline View Users Profile Print this message

Author Icon
Robert Snow
Advanced Member

Posts: 185
Joined: 04/18/2017

Windows 10 professional 64-bit

Dragon 15.6

OneNote 365 Office Desktop (Current Version)

 

I am using Dragon to open OneNote to a specified section called Index-Amerifax. It opens perfectly every time with the following code.

 

Example: 1

SubMain

    AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Amerifax\INDEX-Amerifax.one#section-id={62CFE013-C5C7-49D4-B22A-FF35CF2AE97F}&end"

EndSub

 

Now I would like to open 3 NoteBooks at the same time, to a specified section. I figured that if I just added a similar line of code it would work, not so. Here is my attempt.

 

Example 2

SubMain

AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Amerifax\INDEX-Amerifax.one#section-id={62CFE013-C5C7-49D4-B22A-FF35CF2AE97F}&end"

AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\AX\Index-AX.one#section-id={8A404750-009E-4E29-AC84-5062682F6BF3}&end"

AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Design\INDEX-Design.one#section-id={AE95F130-BA3B-48BA-A8EA-DEEF48E1C4F0}&end"

EndSub

 

If I create a macro as in example 1, with the proper code for each notebook. It works very well. The problem comes in when I tried to run the macro as in the Example 2

Bob



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

Robert Snow
Germantown, WI



 12/20/2021 04:40 PM
User is offline View Users Profile Print this message


Alan Cantor
Top-Tier Member

Posts: 4280
Joined: 12/08/2007

Ensure the second and third AppBringUp statements work on their own.

If each one works, try adding a delay between each of the three AppBringUp statements. How long? Hard to say. Maybe 500 ms, plus or minus.
 12/20/2021 06:04 PM
User is offline View Users Profile Print this message

Author Icon
Robert Snow
Advanced Member

Posts: 185
Joined: 04/18/2017

I tried a delay of 500ms and the command editor would not let me save it. So I must be entering the delay incorrectly. What I tried:

SubMain
    AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Amerifax\INDEX-Amerifax.one#section-id={62CFE013-C5C7-49D4-B22A-FF35CF2AE97F}&end"
    Delay "500ms"
    AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\AX\Index-AX.one#section-id={8A404750-009E-4E29-AC84-5062682F6BF3}&end"
    Delay "500ms"
  AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Design\INDEX-Design.one#section-id={AE95F130-BA3B-48BA-A8EA-DEEF48E1C4F0}&end"
EndSub
Bob


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

Robert Snow
Germantown, WI

 12/20/2021 06:48 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39769
Joined: 10/01/2006

Try changing Delay 500ms to Wait 0.5



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

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

 12/23/2021 02:07 PM
User is offline View Users Profile Print this message

Author Icon
Robert Snow
Advanced Member

Posts: 185
Joined: 04/18/2017

Lunis, that is a perfect solution to the issue. I used Wait 1.85. Thanks.

Bob

This opened 3 NoteBooks to Section Tab (Using the Sections Link)

SubMain
AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Amerifax\INDEX-Amerifax.one#section-id={62CFE013-C5C7-49D4-B22A-FF35CF2AE97F}&end"
Wait 1.85
AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\AX\Index-AX.one#section-id={8A404750-009E-4E29-AC84-5062682F6BF3}&end"
Wait 1.85
AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Design\INDEX-Design.one#section-id={AE95F130-BA3B-48BA-A8EA-DEEF48E1C4F0}&end"
EndSub



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

Robert Snow
Germantown, WI



 12/23/2021 04:11 PM
User is offline View Users Profile Print this message

Author Icon
Robert Snow
Advanced Member

Posts: 185
Joined: 04/18/2017

In case somebody else wants to open one or more notebooks. I thought I should probably list out the steps. The 1st thing that was important to me was to be able to get to different sections called:

 

Index-Macro & Ask-MacroX

Index - the section links to all articles within the selected book (Works as any Index Would).

ASK - this section, holds links to messages and topics that pertain to the selected book. Voice command: ASK Opus, Opens Notebook that holds Opus, right to my Topics on Opus.

 

Nuance Dragon - Used to create commands. In any OneNote NoteBook, right click on any section tab, copy link to section & paste as needed. Code looks similar to this:

onenote:///B:\!MS\!OneNote\!MST-SYS\SoftWare\!MS\!OneNote\ASK-OneNote.one#section-id={04677F8C-42E2-4B94-82DB-B62163C0A0A6}&end

 

I then created the command in Dragon myCommand browser. See here:

SubMain

    AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Amerifax\INDEX-Amerifax.one#section-id={62CFE013-C5C7-49D4-B22A-FF35CF2AE97F}&end"

EndSub

 

If opening several notebooks separate the AppbringUp with Wait 1.85, Adjust time for your system if needed.

SubMain

AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Amerifax\INDEX-Amerifax.one#section-id={62CFE013-C5C7-49D4-B22A-FF35CF2AE97F}&end"

Wait 1.85

AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\AX\Index-AX.one#section-id={8A404750-009E-4E29-AC84-5062682F6BF3}&end"

Wait 1.85

AppBringUp "onenote:///B:\!MS\!OneNote\!MST-SYS\Design\INDEX-Design.one#section-id={AE95F130-BA3B-48BA-A8EA-DEEF48E1C4F0}&end"

EndSub

Bob



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

Robert Snow
Germantown, WI



 12/21/2021 01:00 PM
User is offline View Users Profile Print this message

Author Icon
noblemd
Junior Member

Posts: 35
Joined: 08/09/2019

Try viewing the following web page for complete instruction documentation:

https://www.winwrap.com/web2/basic/#!/ref/WWB-doc_wait_instr.htm

 

Try a script with the single Wait .5 instruction - you should be able to save and run the script. (copy the example from the above link)

 

Of course it does not do anything but wait for a half second before completing.

You could always add another instruction to do something like:

 

Sub Main
    Wait .5 ' wait for one half second
SetMicrophone 0 ' Turn off microphone
End Sub
'
If you can save and run the above script,
change your script to use the same syntax.
if your script does not run then something else (other than the WAIT .5) is wrong in your script.
Scripts must have the exact spelling and syntax to work-
For example - There is no "Delay" instruction.
And... the SetMicrophone 0 command is a Dragon specific command not a WinWrap Basic command.
Your script can contain a combination of Dragon specific commands and WinWrap Basic commands.
'
'
Also do the script task manually.
How long does it take for the Windows you are trying to open to actually pop up?
You need to delay for AT LEAST that same amount of time and,
it is a good idea to add extra time to the wait just to be certain each task executes before the next task occurs.
If Window takes FIVE seconds to open when you do it manually the Wait command needs to be
Wait 5 
or even better Wait 6 (an extra second just to be safe)
After you get the timing proper watch the script when it runs - you may have to add even more time to the WAIT command.


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

Michael Noble
-------------------------
Using $20 USB Mic on adjustable arm ($30 total cost - 99.9% recognition). 


 


DPI 15.61.200.010 - Windows 11 Pro for Workstations Latest Update / MS Office 2021 LTSC



 12/21/2021 03:27 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2197
Joined: 03/21/2007

You didn't say what happens. Lemme guess? Does one single OneNote window remain with the last to be mentioned file open? I think AppBringUp reuses existing windows, so does that help explain your issue.

You might try ShellExecuting to each of the OneNote files separately, also with appropriate Waits as mentioned.

Hth,

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




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.

 12/23/2021 02:30 PM
User is offline View Users Profile Print this message

Author Icon
Robert Snow
Advanced Member

Posts: 185
Joined: 04/18/2017

See my Recent replay. my original issue was only 1st notebook would load. Adding the Wait 1.85 between loading notebooks into onenote gave the system the time to complete.

Bob



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

Robert Snow
Germantown, WI

KnowBrainer Speech Recognition » Commands, Scripts, and Macros - Dragon » Open Program

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

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