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


|
Topic Title: Can I Create a Custom Command to Bring up the Font Window in MS Word? Topic Summary: The CTRL-D Command Never Works for Me Created On: 03/01/2012 09:25 AM Status: Post and Reply |
|
![]() |
- drutgat | - 03/01/2012 09:25 AM |
![]() |
- hmyer | - 03/01/2012 09:43 AM |
![]() |
- monkey8 | - 03/01/2012 11:01 AM |
![]() |
- hmyer | - 03/01/2012 12:55 PM |
![]() |
- monkey8 | - 03/01/2012 01:26 PM |
![]() |
- hmyer | - 03/01/2012 02:15 PM |
![]() |
- monkey8 | - 03/01/2012 02:55 PM |
![]() |
- hmyer | - 03/02/2012 07:26 AM |
![]() |
- monkey8 | - 03/02/2012 08:33 AM |
![]() |
- hmyer | - 03/02/2012 09:35 AM |
![]() |
- Jomark | - 03/02/2012 09:42 AM |
![]() |
- Chucker | - 03/02/2012 10:22 AM |
![]() |
- monkey8 | - 03/02/2012 11:20 AM |
![]() |
- Chucker | - 03/02/2012 02:49 PM |
![]() |
- monkey8 | - 03/02/2012 03:13 PM |
![]() |
- R. Wilke | - 03/02/2012 03:19 PM |
![]() |
- Lunis Orcutt | - 03/02/2012 03:44 PM |
![]() |
- monkey8 | - 03/02/2012 03:48 PM |
![]() |
- Chucker | - 03/02/2012 05:45 PM |
![]() |
- Jomark | - 03/03/2012 04:39 AM |
![]() |
- monkey8 | - 03/03/2012 11:32 AM |
![]() |
- Jomark | - 03/03/2012 02:53 PM |
![]() |
- artsilen | - 03/03/2012 04:28 PM |
![]() |
- GDS | - 03/01/2012 10:06 AM |
![]() |
- monkey8 | - 03/01/2012 10:23 AM |
![]() |
- Lunis Orcutt | - 03/01/2012 08:09 PM |
![]() |
- Jomark | - 03/02/2012 04:25 AM |
![]() |
- drutgat | - 03/02/2012 10:20 PM |
![]() |
- drutgat | - 03/03/2012 04:33 PM |
![]() |
- Larry Allen | - 03/03/2012 05:27 PM |
![]() |
- GDS | - 03/05/2012 10:20 AM |
![]() |
- Chucker | - 03/05/2012 10:42 AM |
![]() |
- GDS | - 03/05/2012 11:42 AM |
|
|
|
|
Hi Everyone, I find that there are certain commands which do not work for me in Dragon. For example, the "Click CTRL-D" command does not work in either the Dragon Professional 11.5 that I use at work, or the Dragon Premium 11.5 that I use at home. Whenever I try to use this command the little box that gives one a printout of the voice commands that one's just used says "control the". I have just begun to use the "Create New Command" to create commands which act as macros which pastes text to the screen (e.g., I have used these commands to create signature and address information), but I am not sure how to go about creating a command which will open a window and execute technical task (in this case, I am looking to have the command open the 'Font' window in MS Word). I have seen other posts here on the forum in which people have successfully suggested certain lines of code to remedy certain problems that other people have had, but I am not sure where to place this code or – more to the point! – What code I should write/insert, so any help with this would be gratefully appreciated. Many thanks, Drutgat. |
|
|
|
|
|
|
|
|
sounds like you want to use the SendKeys function... For DNS 8 s couple of examples are You enter this in a custom command where you type in your name for your previous problem. ------------------------- ---- . . . . Help! I can't see vowels!! (and sometimes "y") |
|
|
|
|
|
|
|
|
Quote: SendKeys "{Alt}mnb" SendKeys "{Ctrl+b}" Note that these commands no longer work with version 11 (the first one would never work full stop), the key names when using SendKeys for Alt, Ctrl & Shift have changed to %, ^, + respectively e.g. SendKeys"%d" SendKeys"^%d" To find information on key names you simply need to say "search Dragon help for SendKeys" or alternatively try "search Dragon help for key names". ------------------------- |
|
|
|
|
|
|
|
|
Quote: (the first one would never work full stop) Actually both work with DNS 8, which is also why I specified DNS 8, as not having 11, I didn't know what changed. Also, it might be worth having a custom script for something as simple as a control key combination in certain instances. For instance, in the application that my examples were taking from it has an extraordinary number of short cut keys depending on the Window you are on and it is a lot easier to say the related command word then remembering all the short cut keys. ------------------------- ---- . . . . Help! I can't see vowels!! (and sometimes "y") |
|
|
|
|
|
|
|
|
Quote: Actually both work with DNS 8, which is also why I specified DNS 8, as not having 11, I didn't know what changed. Also, it might be worth having a custom script for something as simple as a control key combination in certain instances. For instance, in the application that my examples were taking from it has an extraordinary number of short cut keys depending on the Window you are on and it is a lot easier to say the related command word then remembering all the short cut keys. Bit touchy are we hmyer, it doesn't work in sending key combinations at the same time but instead pushes the alt key on its own followed by the other keys. This won't always work, for example, in sending a legitimate key combination with certain applications. My intention was not to criticise but simply point out the different key names since, from memory, version 9. ------------------------- |
|
|
|
|
|
|
|
|
I'm not touchy at all. You said it wouldn't work, I was giving assurances that it was real usable example. It works the way it should for the application it was in. I was only giving examples so drutgat could determine the usage that suits. Notice my second example is for 'b' not 'd' as in drutgat's example.
------------------------- ---- . . . . Help! I can't see vowels!! (and sometimes "y") |
|
|
|
|
|
|
|
|
I repeat, it doesn't work (and will never work) in terms of sending a legitimate key combination as it sends the keys sequentially, as drutgat wanted to send a key combination I was pointing out that the sequence of keys you gave is not a legitimate key combination but a sequential pressing of keys and as such will not always work as a legitimate combination shortcut with every application. I'm sure it works in your instance, and it may have the same effect as the key combination, and I'm not disagreeing with that.
Let me give you an example, not particularly meaningful but it will show you the difference. start DragonPad and then press the alt key (this puts DragonPad into the "alt state" and you should see the menu bar highlighted ) Before doing anything else if you then call a script with the following line: SendDragonKeys"{Alt+f}" (with version 8 you can use SendKeys with that syntax) It will open the file menu irrespective of the state that DragonPad is in. If you then repeat the exercise by putting DragonPad into the "alt state" again, by pressing the Alt key on its own, and then sent a script with: SendDragonKeys"{Alt}f" it will do something completely different and remove Dragon from the alt state and probably insert the f character into the editor. Now I know that's a pretty meaningless example but it demonstrates the difference I am talking about and as I am sure you will appreciate this difference is crucial with certain applications. I'm not trying to lecture you but I'm trying to explain the difference so I hope you will accept that. Lindsay ------------------------- |
|
|
|
|
|
|
|
|
In reply to monkey8 Quote: as drutgat wanted to send a key combination No he didn't, he actually wanted Quote: but I am not sure how to go about creating a command which will open a window and execute technical task (in this case, I am looking to have the command open the 'Font' window in MS Word). I was giving examples to show how the functions works. Jomark gave a solution for multiple keys as well. In which case the command for my version of DNS would be but I just tested it and SendKeys "{Alt}hfn" works as well. I never said four keys were being pressed at one time.
------------------------- ---- . . . . Help! I can't see vowels!! (and sometimes "y") |
|
|
|
|
|
|
|
|
JoMark gave a key combination; >>SendKeys "{Alt}hfn" works as well<< There is no key combination in that line. Lindsay ------------------------- |
|
|
|
|
|
|
|
|
Even if you really mean "keyboard short cut", it's a short cut. When you try to open a combination lock, do you try to dial to all the numbers at once? ------------------------- ---- . . . . Help! I can't see vowels!! (and sometimes "y") |
|
|
|
|
|
|
|
|
Quote: JoMark gave a key combination; It was exactly that! No code, nothing. ------------------------- Jomark |
|
|
|
|
|
|
|
|
Hey all, When you're in Microsoft Word, and I can only attest to Microsoft Word 2007 and 2010 because I no longer use Microsoft Word 2003 and I remember that the menus are slightly different, try simply saying "font" and see what happens. You may be very surprised at the results vs. wrapping your leg around your neck to create scripts. Chuck Runquist If you hear the sound of hoofbeats, think horses not zebras. -------------------------
|
|
|
|
|
|
|
|
|
Chuck this is kind of where we came in on this discussion in terms of using the thousands of commands already available. I think I mentioned "choose font" initially above when in fact it should have been "change font" which is another command already available. It has the advantage of bringing up the complete font dialogue as opposed to "font" which just takes you to the font combo box.
I guess a script always has the advantage of allowing you to choose your own name. Lindsay ------------------------- |
|
|
|
|
|
|
|
|
Quote: Chuck this is kind of where we came in on this discussion in terms of using the thousands of commands already available. I think I mentioned "choose font" initially above when in fact it should have been "change font" which is another command already available. It has the advantage of bringing up the complete font dialogue as opposed to "font" which just takes you to the font combo box. I guess a script always has the advantage of allowing you to choose your own name. Lindsay, Are you sure? That is, have you tried it? I just retested it in Microsoft Word 2007 with DNS 10.1 Medical and Microsoft Word 2010 64-bit with DNS 11.5 Professional and what I get when I say "font" is the default Font dialog box. I don't get the combo box at all. Just for the heck of it, try the command and see what it does on your system. I would just be curious as to what your exact results are. "A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila." -- Mitch Ratliffe -------------------------
|
|
|
|
|
|
|
|
|
Chuck,
Well I wasn't sure but I just checked it and now I am :-) if I say "Font" it just highlights "Calibri…" which is my default font although I can then say something like "drop list" and it will show me all the different fonts. That's also consistent with the active accessibility labels, that is if you have hover the mouse over the font title you will see the label "Font". If I say "change font" it gives me the font dialogue with all the other options. I just checked to see if I had added a command at sometime called "font" but I haven't so I'm not quite sure why you are seeing different results unless you have added a command "font" at some point. I'm using Microsoft Office Word 2010. Lindsay ------------------------- |
|
|
|
|
|
|
|
|
Not having KnowBrainer, but having read the postings above, I would surmize that "font" is a KnowBrainer command. Rüdiger
------------------------- Well, it's past the point where we can make any changes in the code, but we can still make changes to the Easter Egg! |
|
|
|
|
|
|
|
|
We can verify that Font is a KnowBrainer command. It's easy to identify most KnowBrainer commands, if you have the Results Box viewable (old school) because KnowBrainer commands appear in Title Case.
-------------------------
|
|
|
|
|
|
|
|
|
And if you don't have an application-specific Microsoft Word KnowBrainer command called "Font" (which takes precedence) there will be an active accessibility one created automatically which is the one, at least for me, which just highlights the font. Do you run KnowBrainer then Chuck?
Lindsay ------------------------- |
|
|
|
|
|
|
|
|
Lindsay, Rüdiger & Lunis, "The best of us must sometimes eat our words." - J. K. Rowling -------------------------
|
|
|
|
|
|
|
|
|
Quote: If I say "change font" it gives me the font dialogue with all the other options Lindsay This does not work for me, it just prints "change font". similarly if I use "set". If I say change font to 9 for example, it will change the font size but does not bring up the font dialogue. In other words, change to or set to must be followed by a specific instruction such as font name, size etc., As I have KB, the Font command works fine. The command that Chuck found in his dungeon is exactly the same format as the KB Font command. ------------------------- Jomark |
|
|
|
|
|
|
|
|
Apologies John as "change font" is a command I have added, the Active Accessibility commands that should be available as follows: Font That is from the smallf ont section on the home ribbon. However these Active Accessibility commands will give precedence to any application-specific command of the same name added using advanced scripting or using KnowBrainer. For the "change font" command I have the following script: Sub Main Lindsay ------------------------- |
|
|
|
|
|
|
|
|
Quote: "choose font" is a command I have added Aha Lindsay. At least you are on a par with Chuck in this regard! ------------------------- Jomark |
|
|
|
|
|
|
|
|
I've had situations in which the mouse cursor seems to hover without engaging either the text window or the command window segments on the screen. Typically, I "anchor" the cursor on the text I need to change by saying the mouseclick command followed by saying the mouse right-click command, and only then saying the font command. Perhaps this is because the font command is not on the quick access toolbar, as I use it very infrequently. I probably do this through force of habit more than anything else, and if I practiced using the set font command I get the same result.
------------------------- Art Silen artsilen@sbcglobal.net; art.silen.mediator@gmail.com "Question assumptions" DSN 11.5, running on Win7;Intel Core i7 CPU 970 @3.20 GHz; System Memory 12 GB; Graphic AMD Radcon HD6570; System Board 2A861.04E01; System Bios 6.15 |
|
|
|
|
|
|
|
|
Drutgat, If you would like to create a command that does anything other than add text and graphics on the screen, then you can't do it using DNS Premium alone. You can do it in DNS Professional, or by using DNS Premium and a third party command utility like KnowBrainer. If you're going to use DNS Pro, and what you want to do is a repeatable sequence of events (like opening programs or pressing keys), consider the Step-by-Step command utility in DNS Pro. It's easy to create a command using the menus here, and telling Dragon one step at a time, "open this window, press these keys, etc." But before you consider a command at all, ask yourself: is it worth it? Do I need it? In your case, you still might be able to do "Control D" by voice. Remember, for keystrokes the command is "PRESS Control D" or "PRESS Control Delta," not "click control D." Click is for the mouse... and really, who needs it? ;-) Best, ------------------------- Eric Wright At work: DNS 12 Pro. At home: DNS 11.5 Pro, KnowBrainer 2011, and Utter Command by RedStart Systems; Dragon Dictate 3 for Mac
Appetite for Dictation - My Blog |
|
|
|
|
|
|
|
|
The key combination you want is Ctrl-Shift-f ("press control shift Foxtrot" then you can give it any name you want. With Premium you will have to use the Natural Language Commands above. No point in writing your own commands if they already exist and like I say above there are thousands of commands for Microsoft Word. ------------------------- |
|
|
|
|
|
|
|
|
To initiate {Ctrl+d} substitute press control D or press control delta rather than click which is reserved for controls and buttons like click OK.
Just adding 1 more example to Lindsay's viable list. You can create an application-specific advanced scripting command such as the following to open the Font box. Sub Main SendSystemKeys "{Ctrl+d}" End Sub As previously noted, there are a number of preset Microsoft Word application-specific commands for Microsoft Word already within the NaturallySpeaking Command Browser or if you want to kick it up a notch, KnowBrainer 2011 includes even more like Set All Times 14 which changes the font style to Times size 14 in the entire document. PS: Find a way to borrow that work copy of DNS Pro and upgrade your personal computer from Premium to Pro. From a Nuance's point of view, it's perfectly legal. -------------------------
|
|
|
|
|
|
|
|
|
Alt+of or Alt+HFN will also bring up the font menu. The first option works in earlier versions of Word as well as 2010 whilst the latter works in Word 2010 KnowBrainer has a command called "font" to do this. ------------------------- Jomark |
|
|
|
|
|
|
|
|
Hi Everyone, Many, many thanks for all of your replies. "Press CTRL D" works for me in both Dragon Professional 11.5 (Win 7, using the current version of MS word, whatever that is), and Dragon Premium 11.5 (Win XP, Word 2003). Some people have talked about using the "Font" command – I have consistently had problems with that in both DNS Professional and DNS Premium using the platforms I described above, and he found no viable way of choosing fonts by voice. Thanks, once again, for all of your help. Drutgat. |
|
|
|
|
|
|
|
|
Hi artsilen, Thanks for much for your reply. Drutgat. |
|
|
|
|
|
|
|
|
There is a totally different way to effectively add a command in Word. The details of the technique vary slightly between versions of Word, but by adding an item to the Word ribbon, the Microsoft Active Accessibility adds a corresponding command. For instance, one can add an instance of the Font Dialog to the ribbon by going to File, Options, Customize Ribbon, then add a Tab if an appropriate one is not already present, then add the "Font (Font Dialog)" to that tab. Then rename the item to something like "typeface". After doing this, the command "typeface" will bring up the font dialog (or "click typeface" if you require the word "click" as I would generally recommend). This technique works so far as I know in all versions of Dragon since it relies on Active Accessibility which is used by Dragon. It is most useful for the Word commands/macros that are not normally displayed on the ribbon but secondarily allows you to use names/words that you create. ------------------------- Larry Allen |
|
|
|
|
|
|
|
|
Just to endorse Larry's approach here -- customizing the Ribbon by voice is a bit of the pain in the butt, but it's my favorite way to add voice commands to Word and Outlook. Dragon uses WYSIWYS (What You See is What You Say) with the Office Ribbon, so I've been able to deploy some convenient Ribbon commands with simple voice command, just by adding the button to the Ribbon in a place where Dragon can "see" it. The best part, of course, is there is no custom command to remember. The words you need to speak to deploy the command are staring you in the face as long as the Ribbon is visible. Generally I agree that the Office Ribbon is a cluttered mess, but it's a huge improvement over Office 2003 for WYSIWYS. ------------------------- Eric Wright At work: DNS 12 Pro. At home: DNS 11.5 Pro, KnowBrainer 2011, and Utter Command by RedStart Systems; Dragon Dictate 3 for Mac
Appetite for Dictation - My Blog |
|
|
|
|
|
|
|
|
Eric, Just FYI and purely from a terminology standpoint just so that everyone is on the same page (uses the same jargon), the feature is not What You See Is What You Say (WYSIWYS). Nuance has a trademark on this feature and it's called Say What You See™ (tracking) and goes back all the way to L&H VoiceXpress, which is where it originally came from. It's available where ever Active Accessibility (MSAA) is supported in applications, dialog boxes, menus, controls, yada yada yada. Chuck Runquist -------------------------
|
|
|
|
|
|
|
|
|
Chuck, You're right, and I appreciate the clarification. WYSIWYS is a term I picked up from Lunis. It's part of KnowBrainer's philosophy -- commands should be short and match the visible label of the activated element. But again, you're right. Dragon uses Say What You See -- which is, strictly speaking, different from the MSAA/UI Automation that enables Say What You See in the first place. ------------------------- Eric Wright At work: DNS 12 Pro. At home: DNS 11.5 Pro, KnowBrainer 2011, and Utter Command by RedStart Systems; Dragon Dictate 3 for Mac
Appetite for Dictation - My Blog |
|
|
|
|
FuseTalk Standard Edition v4.0 - © 1999-2013 FuseTalk™ Inc. All rights reserved.