![]() |
KnowBrainer Speech Recognition | ![]() |


|
Topic Title: Window-specific commands Topic Summary: what if the window title changes Created On: 07/16/2012 10:13 AM Status: Post and Reply |
|
![]() |
- Stephan Kuepper | - 07/16/2012 10:13 AM |
![]() |
- Lunis Orcutt | - 07/16/2012 07:05 PM |
![]() |
- Stephan Kuepper | - 07/17/2012 03:07 AM |
![]() |
- Vincent | - 07/17/2012 05:47 AM |
![]() |
- Stephan Kuepper | - 07/17/2012 10:25 AM |
![]() |
- Vincent | - 07/18/2012 04:22 AM |
![]() |
- monkey8 | - 07/18/2012 09:01 AM |
![]() |
- Stephan Kuepper | - 07/18/2012 09:53 AM |
|
|
|
|
Hi all, I have issues with the "transfer text" command that copies the text from the dictation box into an application. For some applications, the dictation box is not the best solution. Instead, dictation is done into DragonPad or WordPad or MS Word, to be copied into the target application. To this end I created a new global command "transfer text", which works wonderfully in all applications - including the dictation box. This means that the native "transfer text" command is superseded by my own command. I then created a new window-specific command "transfer text" that simply clicks the "Transfer" button, but no joy. After some testing, I found out why: the dictation box title always contains the window it is attached to; right now, for example, "Dictation Box (Posting a message - Mozilla Firefox)". As long as I make the command specific to this particular window, all is well. When I shorten the window title to "Dictation box", the global command again takes priority. Obviously, I can't make window-specific commands for all conceivable applications, so if you have any ideas, please do let me know. I should add that making my own "Transfer text" command specific to the word processor would work, but I would lose the ability to click into the/any target application and say "transfer text". Come to think of it, I might just rename that command "fetch text" - but that still doesn't solve the issue how to make a window-specific command less window-specific. Hope I made myself clear, Best, Stephan ------------------------- www.egs-vertrieb.de - Speech Recognition Blog - Forum: www.immer-eine-Nuance-besser.de |
|
|
|
|
|
|
|
|
We are not certain what advantage an application-specific or Windows specific command would be in copying/cutting text from 1 application to another but in KnowBrainer 2011, we used a slightly different approach which you may find interesting. Because of some stability issues with the Dictation Box, we substituted NotePad. We use Transfer to cut all of the text from NotePad to the clipboard, close Notepad (which like the Dictation Box, closes without a prompt), drops the text and the previous application, presses {Tab} to move to the next field (assuming a next field is present) and re-launches NotePad. We use Transfer Out to perform the same function without reopening NotePad. -------------------------
|
|
|
|
|
|
|
|
|
Lunis,
Thank you for your reply. Actually, I got my idea from you in the first place :-) Closing and re-opening NotePad is a good idea, I missed that one. However this may be, in this particular instance I need formatted text, not just plain text. Therefore I need an editor which supports as much formatting as possible. DragonPad doesn't have enough; WordPad for Windows 7 is the minimum (plus it's available on every Windows computer). One solution would be: 1. a WordPad-specific command that copies all text to the clipboard, closes WordPad, and transfers the contents of the clipboard into the target application (on a remote computer, incidentally, which poses extra challenges) 2. the same for MS Word 3. a global "Fetch dictation" command that switches the focus to WordPad/Word, copies all text, sitches back to the target application and pastes the text there. 4. the native "Transfer text" command for the dictation box. Maybe I'm just too demanding when I want all command expressios to be the same? I don't like to remember too many commands, especially when they basically all do the same thing. Anyway, to rephrase my initial problem: How can I teach Dragon that when I make a window-specific command for the dictation box, it recognizes the dictation box regardless of the actual title? Stephan ------------------------- www.egs-vertrieb.de - Speech Recognition Blog - Forum: www.immer-eine-Nuance-besser.de |
|
|
|
|
|
|
|
|
Hallo Stephan, you don't need the exact title to declare the command's availability window-specific. E.g., may be the full title "Diktierfenster (KnowBrainer Speech Recognition Forums - Window-specific commands - Mozilla Firefox)", then works too. Vincent
|
|
|
|
|
|
|
|
|
Vincent,
that's what I thought, but in this case it didn't work. At least, "Diktierfenster" isn't enough. I can't make window-specific commands for "Diktierfenster - Mozilla Firefox", Diktierfenster - Opera", Diktierfenster - Schießmichtot", though. I'll have to think about a "fetch dictation" command, then, or find another way to tweak the grammar. Best wishes, Stephan ------------------------- www.egs-vertrieb.de - Speech Recognition Blog - Forum: www.immer-eine-Nuance-besser.de |
|
|
|
|
|
|
|
|
Stephan,
another idea: create a global scripting command, which - as first action - extracts the window title. Then decide by your own code what to do. Vincent |
|
|
|
|
|
|
|
|
Stephan,
Window specific commands are full window title specific and not part window title specific. Therefore if you want to do it with the window title then just check if the window title contains "Dictation Box" or the German equivalent. However a much better way of doing it (if I understand you correctly) is just to have one global "Transfer Text" command which checks if the dictation box is the active window, if it is the active window then it just clicks the "Transfer" button and if it isn't it runs your script.
Declare Function FindWindow Lib "user32" Alias _
Just paste the above script into an advanced script command, make sure you use the FindWindow function as I have declared it as it is slightly mutated from the normal declaration. -------------------------
|
|
|
|
|
|
|
|
|
Lindsay, ------------------------- www.egs-vertrieb.de - Speech Recognition Blog - Forum: www.immer-eine-Nuance-besser.de |
|
|
|
|
FuseTalk Standard Edition v4.0 - © 1999-2013 FuseTalk™ Inc. All rights reserved.