WinBatch Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: Ron47 on May 10, 2019, 04:51:02 pm

Title: modifying a simple vbs script for use in WinBatch
Post by: Ron47 on May 10, 2019, 04:51:02 pm
I use the Dragon speech program and have a vbs script that will run Dragon commands as if I spoke them.

The following vbs script turns off the Dragon microphone. How can I modify the script so I can use it in Winbatch?

x="close microphone"
Set Dgn = GetObject("","Dragon.DgnEngineControl")
Dgn.Register
Dgn.RecognitionMimic(x)
Dgn.UnRegister(0)
Set Dgn = Nothing

Thanks!

Ron

Title: Re: modifying a simple vbs script for use in WinBatch
Post by: stanl on May 12, 2019, 02:24:23 am
try
Code: Winbatch
x="close microphone"
Dgn = GetObject("","Dragon.DgnEngineControl")
Dgn.Register()
Dgn.RecognitionMimic(x)
Dgn.UnRegister(0)
Dgn = 0
Exit
 
Title: Re: modifying a simple vbs script for use in WinBatch
Post by: Ron47 on May 12, 2019, 09:15:06 am
That works!
Much appreciated!

Ron
Title: Re: modifying a simple vbs script for use in WinBatch
Post by: td on May 13, 2019, 01:12:43 pm
And, hopefully, time was taken to understand what Stan changed to make the VBS example a WinBatch script instead of just performing a copy&paste.