MSSpeech-Forum Homepage
Forum Home Forum Home > Windows™ Speech Recognition Forums > Macros and Macro Development
  New Posts New Posts RSS Feed - Can We Get Something Like Dictation Box?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Can We Get Something Like Dictation Box?

 Post Reply Post Reply
Author
Message
fabbott View Drop Down
Member
Member


Joined: 18/Aug/2008
Location: Texas
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote fabbott Quote  Post ReplyReply Direct Link To This Post Topic: Can We Get Something Like Dictation Box?
    Posted: 17/Oct/2008 at 11:32pm
In an earlier day, David Austin had a program for DNS called "Enable
That" which created a popup text box into which you could dictate and
then paste the dictation into programs where DNS did not work (such as
OpenOffice). DNS later incorporated it as "Dictation Box", or maybe
Banned did, I think he claimed credit, and I do not know to whom
to give the credit.

With OpenOffice 3.0 now finally released, I was hoping we could find something like that to use with WSR. I have written David Austin, but I have not had a reply, and I do not know if he is still actively developing such add ins.

I am going to cross post this to MS-Speech in the hopes that some programmer might take a crack at it. It really was useful to those of us who would use OpenOffice, or any other program where we could not use the "select-and-say" editing. It gave you popup dictating capability without having to open a new program (such as WordPad) and then pasting into the first program. Old Timers may remember that Via Voice had a similar capability that allowed you to cross from their WordPad module (I don't remember its name but I am sure Quentin does).

I think it would be a nice addition as a macro library.

Frank Abbott
Back to Top
mmarkoe_admin View Drop Down
Admin Group
Admin Group
Avatar

Joined: 16/Jul/2008
Status: Offline
Points: 331
Post Options Post Options   Thanks (0) Thanks(0)   Quote mmarkoe_admin Quote  Post ReplyReply Direct Link To This Post Posted: 18/Oct/2008 at 11:28pm

Frank,

I will leave it up to Brad and others to see if the dictation box idea can be done programmatically. In the meantime, I cannot imagine it would be any problem to create a macro that opens Notepad, and other macro to copy it to the clipboard. Possibly even the ability to switch to another application and then paste in.

Marty

Back to Top
BradT View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 06/Oct/2008
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote BradT Quote  Post ReplyReply Direct Link To This Post Posted: 19/Oct/2008 at 4:16pm
Originally posted by fabbott fabbott wrote:


I think it would be a nice addition as a macro library.


Frank,

Take a look at the macro in this forum post, it may do what you're thinking about.

http://www.msspeech-forum.com/forum_posts.asp?TID=27&PID=148#148

Brad

Back to Top
fabbott View Drop Down
Member
Member


Joined: 18/Aug/2008
Location: Texas
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote fabbott Quote  Post ReplyReply Direct Link To This Post Posted: 21/Oct/2008 at 4:19pm
I should note that I received a note yesterday from David Austin who said that he was probably out of the programming for Vista WSR or DNS business, 

On a more promising note, Brad had created a macro which begin to approach Enable That by opening a notepad window and allowing dictation in that program to be copied back to the calling program.  It works pretty well as long as the dictation will be placed in a new file in the calling program, but if you try it from a file that had been named and closed, it can't find the window. The macro works by using the generic window title for the file.  I have also tweaked the macro to use WordPad instead of notepad, useful if you want to apply some formattign to the text (bold, italics, etc), but I have not been able to overcome the copy to a previously named file yet.    But the macro works with OpenOffice just fine if you remember to modify the macro to use the window title of "untitled1."  Kudos to Brad on that one.

Also, for those who may be less than clever programmers, Brad's Macro Handbook is a useful addition to building your own macros, and for $10 is a great value. 

Frank Abbott
Back to Top
BradT View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 06/Oct/2008
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote BradT Quote  Post ReplyReply Direct Link To This Post Posted: 21/Oct/2008 at 7:53pm
Thanks for the plug Frank.  Smile

Could you describe (again) what you'd like the functionality of this dictate box to be?  Give me a possible scenario.  I may have a way to programatically determine the active applications window title...

Brad
Back to Top
fabbott View Drop Down
Member
Member


Joined: 18/Aug/2008
Location: Texas
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote fabbott Quote  Post ReplyReply Direct Link To This Post Posted: 21/Oct/2008 at 8:25pm
Brad:

A possible scenario might be like this:
Day 1, working in OpenOffice write, I use the dictation box to begin drafting a memorandum on some subject. I finish the draft and save the file  as "The Wonderful Working of Dictation Box.doc".  On Day 2, I return to add to the memo a new feature which I have discovered, open the file "The Wonderful Working of Dictation Box.doc", begin my editing, and call up the dictation box to dictate some additional material.  When I have finished that dictation, I want to save the file with the text now updated, or changed.  Under the current macro, that doesn't seem to be  happening, at least for me.  It will not save the file but returns an error "switchToApp Executor failure!"
"windowsTitleContains: Untitled1"
"0x8004503A:"
"The requested data item (data key, value, etc.) was not found"

What I want is, of course, that it would post the data back into the original file  at the point of calling the macro.  I hope this helps.  I tried to store the window title to a variable, but either I did it wrong (most likely) or it does not work.

Frank Abbott
Back to Top
BradT View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 06/Oct/2008
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote BradT Quote  Post ReplyReply Direct Link To This Post Posted: 22/Oct/2008 at 10:59am
Originally posted by fabbott fabbott wrote:


What I want is, of course, that it would post the data back into the original file  at the point of calling the macro.  I hope this helps.  I tried to store the window title to a variable, but either I did it wrong (most likely) or it does not work.


Frank,

I'm looking into the possibility of a more "professional" solution, but in the meantime...

I just thought of something... If you bring up your OpenOffice document, then initiate your Dictation Box macro, you don't really need to know the name of the window to switch back and forth.  Alt-Tab will work nicely (assuming OpenOffice and Wordpad are the last two apps to be opened).

For instance:
Open your desired OO document, then say "open dictation box" (or whatever you've set the macro to listen for).  Wordpad will now open.  All you need to do at this point is use sendKeys to send the Alt-Tab to switch back to OO and Alt-Tab again to switch back to Wordpad.

Here's the modified macro (using your wordpad modification):

<speechMacros>

<!-- begin dictation -->
<command>

<listenFor>open dictation box</listenFor>
<run command="wordpad.exe" params=""/>

</command>
 
<!-- post dictation -->
<command>

<listenFor>post dictation</listenFor>

<sendKeys>{{CTRL}}a</sendKeys>
<waitFor seconds=".25"/>
<sendKeys>{{CTRL}}c</sendKeys>
<waitFor seconds=".25"/>

<!-- switch to non-SR app -->
<sendKeys>{{ALT}}{TAB}</sendKeys>
<waitFor seconds=".5"/>
<sendKeys>{{CTRL}}v</sendKeys>
<waitFor seconds=".25"/>

<!-- switch back and clear -->
<sendKeys>{{ALT}}{TAB}</sendKeys>
<waitFor seconds=".5"/>
<sendKeys>{{CTRL}}a{250 WAIT}{DELETE}</sendKeys>

</command>

</speechMacros>


Let me know what you think.

Brad

Back to Top
fabbott View Drop Down
Member
Member


Joined: 18/Aug/2008
Location: Texas
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote fabbott Quote  Post ReplyReply Direct Link To This Post Posted: 23/Oct/2008 at 9:02pm
Thanks, Brad.  It works fine.  I made one other adjustment that I will keep in mine to close the Wordpad after transferring that txt rather than clearing it.  That way, I only have one extra program open, and only for a short time.  I close it  by sending an {{ALT}}f, then x, then n.    I did it with a series of sendKey commands, to be sure that it would work, but I will clean that up and post the final code later.  Sorry it took so long, I was out of town yesterday, and my little netbook only has XP on it, so I could not test the idea until I returned. Your help was invaluable.

Frank Abbott


Edited by fabbott - 23/Oct/2008 at 9:03pm
Back to Top
fabbott View Drop Down
Member
Member


Joined: 18/Aug/2008
Location: Texas
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote fabbott Quote  Post ReplyReply Direct Link To This Post Posted: 23/Oct/2008 at 10:32pm
Here is the revised macro.  This macro allows a user to dictate into a non-speech compliant program.  It opens a WordPad  window from the program, allows the user to dictate into the window, and when completed, transfers the dictation to the calling program.  It then returns to WordPad, clears the text and closes WordPad.  This allows a user to multiple dictations exercises (excellent for editing previously completed files. without keeping multiple copies of WordPad open. 

This is based on BradT's efforts to whom all the credit should go.


Frank Abbott

<speechMacros>

<!-- dictation box -->
<command>

<listenFor>open dictation box</listenFor>
<run command="wordpad.exe" params=""/>

</command>
 
<!-- post dictation -->
<command>

<listenFor>post dictation</listenFor>

<sendKeys>{{CTRL}}a</sendKeys>
<waitFor seconds=".25"/>
<sendKeys>{{CTRL}}c</sendKeys>
<waitFor seconds=".25"/>

<!-- switch to non-SR app -->
<sendKeys>{{ALT}}{TAB}</sendKeys>
<waitFor seconds=".5"/>
<sendKeys>{{CTRL}}v</sendKeys>
<waitFor seconds=".25"/>

<!-- switch back and clear -->
<sendKeys>{{ALT}}{TAB}</sendKeys>
<waitFor seconds=".5"/>
<sendKeys>{{CTRL}}a{250 WAIT}{DELETE}</sendKeys>
<sendKeys>{{ALT}}f</sendKeys>
<sendKeys>x</sendKeys>
<sendKeys>n</sendKeys>

</command>

</speech macro>
Back to Top
gadgetfl View Drop Down
Member
Member


Joined: 02/Feb/2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote gadgetfl Quote  Post ReplyReply Direct Link To This Post Posted: 06/Feb/2009 at 1:09am
Great Macro Guys but there was a typo in it.
Here is the correction
 
 
 
<speechMacros>

<!-- dictation box -->
<command>

<listenFor>open dictation box</listenFor>
<run command="wordpad.exe" params=""/>

</command>
 
<!-- post dictation -->
<command>

<listenFor>post dictation</listenFor>

<sendKeys>{{CTRL}}a</sendKeys>
<waitFor seconds=".25"/>
<sendKeys>{{CTRL}}c</sendKeys>
<waitFor seconds=".25"/>

<!-- switch to non-SR app -->
<sendKeys>{{ALT}}{TAB}</sendKeys>
<waitFor seconds=".5"/>
<sendKeys>{{CTRL}}v</sendKeys>
<waitFor seconds=".25"/>

<!-- switch back and clear -->
<sendKeys>{{ALT}}{TAB}</sendKeys>
<waitFor seconds=".5"/>
<sendKeys>{{CTRL}}a{250 WAIT}{DELETE}</sendKeys>
<sendKeys>{{ALT}}f</sendKeys>
<sendKeys>x</sendKeys>
<sendKeys>n</sendKeys>

</command>

</speechMacros>

Back to Top
mmarkoe_admin View Drop Down
Admin Group
Admin Group
Avatar

Joined: 16/Jul/2008
Status: Offline
Points: 331
Post Options Post Options   Thanks (0) Thanks(0)   Quote mmarkoe_admin Quote  Post ReplyReply Direct Link To This Post Posted: 06/Feb/2009 at 7:32am
<listenFor>open dictation box</listenFor>
 
Dragon NaturallySpeaking has a proprietary command "Show Dictation Box." Even though the "Open dictation box" command opens Wordpad or Notepad, for legal reasons I suggest changing the command to:
<listenFor>open dictation window</listenFor>
 
Marty Markoe


Edited by mmarkoe_admin - 06/Feb/2009 at 7:33am
Back to Top
BradT View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 06/Oct/2008
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote BradT Quote  Post ReplyReply Direct Link To This Post Posted: 06/Feb/2009 at 5:24pm
Originally posted by gadgetfl gadgetfl wrote:

Great Macro Guys but there was a typo in it.
Here is the correction
 


Thanks gadgetfl.  Where was the typo? Approve

Brad
Back to Top
gadgetfl View Drop Down
Member
Member


Joined: 02/Feb/2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote gadgetfl Quote  Post ReplyReply Direct Link To This Post Posted: 08/Feb/2009 at 1:18pm

</speech macro>  <<<<<<<<<<<

</speechMacros> <<<<<<<Correct

Back to Top
Teejah View Drop Down
Member
Member


Joined: 08/May/2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Teejah Quote  Post ReplyReply Direct Link To This Post Posted: 10/May/2009 at 5:00am
Hi all,

Thanks for this very interesting macro. It helped me out a lot. I simplified the end of the macro a bit. I thought it is not necessary to explicitly delete whatever is left in Wordpad, and closing Wordpad can be done with the general shortcut ALT-F4 instead of going through the menu. This does not change anything to its behavior though. My version of the macro can be found below:

<?xml version="1.0" encoding="UTF-16"?>
<speechMacros>
<!-- dictation box -->
<command>

<listenFor>open dictation box</listenFor>
<run command="wordpad.exe" params=""/>

</command>
 
<!-- post dictation -->
<command>

<listenFor>post dictation</listenFor>

<sendKeys>{{CTRL}}a</sendKeys>
<waitFor seconds=".25"/>
<sendKeys>{{CTRL}}c</sendKeys>
<waitFor seconds=".25"/>

<!-- switch to non-SR app -->
<sendKeys>{{ALT}}{TAB}</sendKeys>
<waitFor seconds=".5"/>
<sendKeys>{{CTRL}}v</sendKeys>
<waitFor seconds=".25"/>

<!-- switch back and clear -->
<sendKeys>{{ALT}}{TAB}</sendKeys>
<waitFor seconds=".5"/>
<sendKeys>{{ALT}}{F4}</sendKeys>
<sendKeys>n</sendKeys>

</command>

</speechMacros>

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.02
Copyright ©2001-2019 Web Wiz Ltd.

This page was generated in 0.282 seconds.

Microsoft Most Valuable Professional

§- Thank you for visiting our Windows Speech Recognition and Macro Forum.. -§