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) Select

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.