Can We Get Something Like Dictation Box? |
Post Reply |
Author | |
fabbott
Member Joined: 18/Aug/2008 Location: Texas Status: Offline Points: 13 |
Post Options
Thanks(0)
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 |
|
mmarkoe_admin
Admin Group Joined: 16/Jul/2008 Status: Offline Points: 331 |
Post Options
Thanks(0)
|
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 |
|
BradT
Moderator Group Joined: 06/Oct/2008 Status: Offline Points: 40 |
Post Options
Thanks(0)
|
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 |
|
fabbott
Member Joined: 18/Aug/2008 Location: Texas Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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 |
|
BradT
Moderator Group Joined: 06/Oct/2008 Status: Offline Points: 40 |
Post Options
Thanks(0)
|
Thanks for the plug Frank.
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 |
|
fabbott
Member Joined: 18/Aug/2008 Location: Texas Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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 |
|
BradT
Moderator Group Joined: 06/Oct/2008 Status: Offline Points: 40 |
Post Options
Thanks(0)
|
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 |
|
fabbott
Member Joined: 18/Aug/2008 Location: Texas Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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 |
|
fabbott
Member Joined: 18/Aug/2008 Location: Texas Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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> |
|
gadgetfl
Member Joined: 02/Feb/2009 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Great Macro Guys but there was a typo in it.
Here is the correction
<speechMacros>
<!-- dictation box --> <listenFor>open dictation box</listenFor> </command> <listenFor>post dictation</listenFor> <sendKeys>{{CTRL}}a</sendKeys> <!-- switch to non-SR app --> <!-- switch back and clear --> </command> </speechMacros> |
|
mmarkoe_admin
Admin Group Joined: 16/Jul/2008 Status: Offline Points: 331 |
Post Options
Thanks(0)
|
<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 |
|
BradT
Moderator Group Joined: 06/Oct/2008 Status: Offline Points: 40 |
Post Options
Thanks(0)
|
Thanks gadgetfl. Where was the typo? Brad |
|
gadgetfl
Member Joined: 02/Feb/2009 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
</speech macro> <<<<<<<<<<< </speechMacros> <<<<<<<Correct |
|
Teejah
Member Joined: 08/May/2009 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
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> |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |