Dragonfly -- programming Java
Submitted by firegift on Thu, 11/20/2008 - 21:14.
Is it possible in dragonfly to get the previous dictation from dragonfly.
In Dragon NaturallySpeaking it is possible to see the dictation history. Is there anyway accessing this in Python?
It would be nice, if you I was able to access previous dictation so I can say something like "string buffer" pause "method that" and it would type out "stringBuffer".

Formatting variable names
Hi Firegift,
I think I have just what you need. It's slightly different from what you describe, but in my experience more efficient for variable name formatting. It's a single utterance command:
"Java method string buffer" ->
"stringBuffer"Or more generally:
"<format> <dictation>"
(Many different formatting styles are available, see the link below.)
It's available from the Dragonfly command-modules repository here: http://dragonfly-modules.googlecode.com/svn/trunk/...
Please let me know if this works for you,
-- Chris.
Thanks. This works pretty
Thanks.
This works pretty well.
Do you think it's possible to create a grammar that does this:
Speak: "method" pause "string buffer"
Type: StringBuffer
This way, I will be able to see a list of method starting with string in code completion.
Is it possible in dragonfly to create a method for grammar that is modal?
Reordering your example
Hi Firegift,
In your example you say "method" pause "string buffer". Do you perhaps mean first "string buffer" and then "method"? Otherwise I'm a little bit confused as how to get the code completion to work properly. Could you please elaborate on your example, so I better understand your workflow.
And on your other question, what do you mean by "modal"? Do you mean that rules are context-sensitive, i.e. they are only active within certain contexts (application, window title, other rule was just recognized to activate this one)? If you could please give me an example of a modal method for a grammar, then I can help you further.
-- Chris.
forget it, i'll just use
forget it, i'll just use your format variable file.
<1..9> join and <1..9> JC
just for another idea of a way to say things...
I use commands:
<1..9> join - joins the previous "n" words together as they are
<1..9> JC - joins and capitalizes the words (pronounced jay-see)
You could also do:
<1..9> camel - camel case
etc.
unimacro grammar _general does this...
In unimacro (grammar _general) there is a command:
It takes the last 1, 2, 3, 4 or 5 (1 is the default) words you dicatated (words just before the cursor) and capitalizes.
-"Variable Back 2" makes from "hello again": "helloAgain"
-"Method Back 2" makes from "more stuff": "MoreStuff"
Of course its behaviour can be extended. As a "side effect" the capitalised word is inserted in the vocabulary, so at repeated calls of the phrase "this is hello again" you probably get: "this is helloAgain". Etc.
Quintijn
This is more like what I
This is more like what I want, but I don't want to say number.
This one is simple, and you
I just changed unimacro grammar _general.py so "Variable back" and "Method back" takes the last phrase (by "HeardWord select that"). Did not make a new installer yet, but the function that has been changed is now:
def gotResults_variable(self,words,fullResults): cmdVariable = self.hasCommon(words[0], 'Variable') cmdMethod = self.hasCommon(words[0], 'Method') if words[-1] in ['1','2', '3', '4', '5']: c = int(words[-1]) keystroke('{Shift+Ctrl+ExtLeft %s}' % c) else: action("HW select that") natqh.Wait(0.1) keystroke('{ctrl+x}') natqh.Wait(0.1) t = natut.getClipboard() # put spaces if they were collected on the clipboard: while t and t[0] == " ": t = t[1:] keystroke(" ") t = t.strip() if not t: print 'no variable to compress!' return # split words into a list: w = t.split() if cmdVariable or cmdMethod: # uppercase each command word: w = map(self.capit, w) T = ''.join(w) if cmdVariable: T = T[0].lower() + T[1:] # add words to vocabulary! if len(w) > 1: natqh.addWordIfNecessary(T+'\\'+t) else: natqh.addWordIfNecessary(T) keystroke(T)new natlink/unimacro release
See release natlink3.6:
http://qh.antenna.nl/unimacro/installation/install...
The improvement above has been put into this release.
Quintijn