10
8
The question was unfortunately closed but feel free to leave comments or answer at https://www.quora.com/How-can-we-use-Dragon-naturally-Speaking-to-code-more-efficiently. You can also vote to reopen this question if you have enough rep. Thanks!
I'm looking for ways to augment mouse and keyboard control with another form of input.
We use Dragon to trigger macro expansion. For instance, to create a voice command to write a loop template in Python, we can use the following Advanced Scripting command:
Sub Main
Clipboard("for i in range():" & vbCrLf)
SendKeys "^v{TAB}"
End Sub
To return the variable that is in the clipboard in Python:
Sub Main
originalClipboard = Clipboard
Clipboard("return " & originalClipboard)
SendKeys "^v"
Wait(1)
Clipboard(originalClipboard)
End Sub

To add a title and a legends to a figure in Matlab:
Sub Main
Clipboard("title('')" & vbCrLf & "xlabel('')" & vbCrLf & "ylabel('')")
SendKeys "^v"
SendKeys "{Enter}"
End Sub
And so on. I'm looking for any information (tips/ideas/libraries/etc) to use Dragon NaturallySpeaking to code more efficiently.
Programming is an activity that relays a lot in visual feedback: syntax highlighting, compiler errors in red, breakpoints, formatting. So if you need to be watching the screen Why do you try to do it without a keyboard? In fact the bottleneck should be in your mind unless you are really productive. – borjab – 2016-01-19T12:05:38.237
3
Although this wasn't exactly your question, there is some research into speech dictation of code, for disabled people, but it's not mature. See e.g. http://research.microsoft.com/en-us/um/people/abegel/qual/node16.html. See also related question http://programmers.stackexchange.com/questions/47933/programming-by-dictation.
– D Coetzee – 2012-07-16T01:27:56.997Thanks a lot for the links! – Franck Dernoncourt – 2012-07-16T01:47:11.840