Hi, I left out a step in the step by step explanation. I'll reproduce that particular section in full with the missing step added. The newly added step is number 11. Step by step This kind of command involves inserting keystrokes and other things, like waiting periods, into the new command dialog. I'll use the example of writing a command for MS Word that will bring up the, Open, dialog box and automatically move you to your file list. I know, we already have a command for this, Go to my file list, but I'll just use this as an example. 1. Make sure the command browser is open and in script mode. 2. Start Ms Word with the command, start Word. 3. Switch back to the command browser. 4. Enter the new command dialog by using the command, New command. Alternatively, press CTRL+n. 5. Give your command a name, I used, Open one of my files. 6. Move through the controls in this dialog using the command, next control. 7. I usually skip training the command. 8. For the description use something like, moves directly to my file list in the Word open file dialog. 9. Leave the group as, User defined. 10. The next control concerns availability and it's on, Global, by default. You want it to be application specific so either press down arrow or use the command, Move down. 11. Select Microsoft Word from the next combo box so that your new command will only be available in Word. 12. Ignore the next control. 13. The next control just says, %s. But it concerns the command type that you want to create. Step by step is the third one down so use the command, Move down, twice or press the down arrow. The only way you'll know you're in the right place is that J-Say will say, 3 of 4. 14. Continue moving forward by controls until you get to the, New step, combo box. It will be focused on, Keystrokes. This is what you want. 15. The next control is the insert button which will allow you to insert your keystrokes. 16. Activate the, Insert, button and type the first keystroke you want, in this case, CTRL+o. Hit Enter and the keystroke is inserted. 17. Focus moves back to the New step combo box. You probably want to insert a pause here. Down arrow to, Wait, and hit Enter. It will ask you how many milliseconds you want to wait. I used 300. 18. Next you want to insert the keystroke, Shift+Tab. Ensure that, Keystroke is selected in the new step combo box. Tab to the Insert button and activate it. In order to insert a shift tab you'll need to pass the keystroke by JAWS. Press JAWSKey+3, then hit Shift+Tab followed by Enter. 19. Insert a shorter wait period, I used 50 milliseconds. 20. Insert another Shift+tab as above. 21. Save the command. The control prior to the new step combo box will display each step that you have inserted in order. If you make a mistake, you can focus on the step you want to remove, tab to the, Delete button and press spacebar. You'll notice that there are several options in the new step dialog that you might like to try out. Sue W. Martin, Management Analyst Department of Veterans Affairs OHI, Section 508 205.943.2391 Intranet: http://vaww.vista.med.va.gov/508workgroup/ Internet: http://www.ehealth.va.gov/508/ From: j-say-bounce@xxxxxxxxxxxxx [mailto:j-say-bounce@xxxxxxxxxxxxx] On Behalf Of Martin, Sue W. Sent: Tuesday, October 18, 2011 12:51 PM To: j-say@xxxxxxxxxxxxx Subject: [j-say list] Re: building commands involving JAWS keystrokes and scripts Hi Stuart, I look forward to a tutorial from Pranav. I figured I'd just give you the quick and dirty version so you can get started. There are basically three methods of scripting Dragon commands that I have used. New Copy, Step by step, and advanced scripting. The first part will be the same for all three types of commands so I'll give you that part first. 1. Use the command, Start command browser, to open the command browser. Or use the keystroke sequence, Shift+CTRL+f12, t, b. 2. When the command browser opens you will be in either browse mode or script mode. In order to write new commands you'll need to be in script mode. You can get there with the command, script mode. Alternatively, pull down the Mode menu with Alt+m and down arrow to Script mode. If it's checked press escape twice to get out of the menus. If it's not checked, hit Enter and it will be checked. 3. Now you're ready to go. New Copy: Let's say you'd like to use a different command than the existing command to accomplish something. You can make a new copy of a command and name it whatever you want to. After performing the steps above,locate a command that you'd like to make a new copy of. 1. When the command browser opens, you will be on the global commands item. Move to the list of commands by either pressing tab twice or by using the command, Move forward two controls. 2. You now want to locate the command that you want to make a copy of. I'll use the command, Be quiet. You can't get there by speaking the command so you'll either have to type b e or use the command, press bravo until you find it. 3. Once ffocused on the, Be quiet, command, create a new copy using the following commands: Script menu. New Copy. Or press CTRL+Shift+n. 4. Now you can give the command whatever name you want it to have. I used, That will do. 5. Save the command using the command, Click save, or press Alt+v. The command is done and immediately available to you. There's no need to restart J-Say. Step by step This kind of command involves inserting keystrokes and other things, like waiting periods, into the new command dialog. I'll use the example of writing a command for MS Word that will bring up the, Open, dialog box and automatically move you to your file list. I know, we already have a command for this, Go to my file list, but I'll just use this as an example. 1. Make sure the command browser is open and in script mode. 2. Start Ms Word with the command, start Word. 3. Switch back to the command browser. 4. Enter the new command dialog by using the command, New command. Alternatively, press CTRL+n. 5. Give your command a name, I used, Open one of my files. 6. Move through the controls in this dialog using the command, next control. 7. I usually skip training the command. 8. For the description use something like, moves directly to my file list in the Word open file dialog. 9. Leave the group as, User defined. 10. The next control concerns availability and it's on, Global, by default. You want it to be application specific so either press down arrow or use the command, Move down. 11. Ignore the next control. 12. The next control just says, %s. But it concerns the command type that you want to create. Step by step is the third one down so use the command, Move down, twice or press the down arrow. The only way you'll know you're in the right place is that J-Say will say, 3 of 4. 13. Continue moving forward by controls until you get to the, New step, combo box. It will be focused on, Keystrokes. This is what you want. 14. The next control is the insert button which will allow you to insert your keystrokes. 15. Activate the, Insert, button and type the first keystroke you want, in this case, CTRL+o. Hit Enter and the keystroke is inserted. 16. Focus moves back to the New step combo box. You probably want to insert a pause here. Down arrow to, Wait, and hit Enter. It will ask you how many milliseconds you want to wait. I used 300. 17. Next you want to insert the keystroke, Shift+Tab. Ensure that, Keystroke is selected in the new step combo box. Tab to the Insert button and activate it. In order to insert a shift tab you'll need to pass the keystroke by JAWS. Press JAWSKey+3, then hit Shift+Tab followed by Enter. 18. Insert a shorter wait period, I used 50 milliseconds. 19. Insert another Shift+tab as above. 20. Save the command. The control prior to the new step combo box will display each step that you have inserted in order. If you make a mistake, you can focus on the step you want to remove, tab to the, Delete button and press spacebar. You'll notice that there are several options in the new step dialog that you might like to try out. Advanced scripting: You mentioned that you wanted to have a command to allow you to switch voice profiles. The keystroke for this is CTRL+JAWSKey+s. If you try to insert that keystroke into the, New command, dialog, you'll find that the CTRL and s get inserted but the JAWSKey is ignored. So, the script you want to call is named, SelectAVoiceProfile. Follow steps 1 through 12 as above, except move down to the fourth item in the command type combo box. It's called advanced scripting but J-Say will just say 4 of 4. 1. Bring up the New command dialog from within the command browser. 2. Give the command a name, I used, Select a JAWS Voice Profile, to prevent confusion about whether we're talking about a JAWS voice profile or a Dragon voice profile. 3. When you get to the combo box that just says, %s, press down arrow until you are on 4 of 4 which is advanced scripting. 4. The next control you will interact with will simply say, sub main end sub. This is where you'll insert the syntax that will call the script. 5. Use down arrow so that you're focused on the blank line in between the lines that say, sub main and end sub. 6. The syntax for calling a script looks like this: DllCall "MSGW1004","JFWRunScript","" You'll insert the name of the script between the last two quotation marks. In this case, the name of the script is, SelectAVoiceProfile. Type that in between the quotation marks and save your command. That's it. Give it a shot. Sue W. Martin, Management Analyst Department of Veterans Affairs OHI, Section 508 205.943.2391 Intranet: http://vaww.vista.med.va.gov/508workgroup/ Internet: http://www.ehealth.va.gov/508/