Possible to trigger script upon DNS shutdown?
Submitted by reckoner on Sun, 09/27/2009 - 03:27.
Is it possible to trigger a script upon shutdown of DNS? How about triggering when DNS saves its speech files?
Thanks!
Speech ComputingWhere Speech Meets Computing |
|
User loginRegistering and logging in removes this ad.
--- Registering and logging in removes this ad. |
NavigationPopular content
Who's onlineThere are currently 0 users and 7 guests online.
|
No. You may be able to
No. You may be able to trigger a script that also includes closing Dragon NaturallySpeaking, but once you close a user profile or exit Dragon NaturallySpeaking, no scripts are accessible or executable.
I guess your post begs the question what is it that you specifically want to do?
Chuck Runquist
Former Dragon NaturallySpeaking SDK & Senior Technical Solutions PM for DNS
If computers get too powerful, we can organize them into a committee - that will do them in. - Bradley's Bromide
NatLink intercepts -changes
NatLink intercepts
-changes of user profile (at open of another speech profile, not at closing time, I think) and
-changes of microphone state.
See the source of natlinkmain.py.
I agree, for a change
, with Chuck. What do you want to do?
Quintijn
thanks for your reply. What
thanks for your reply.
What I am trying to do is run a specific save-current-state of natlink modules either when DNS saves the user profile or just before DNS shutdown. This is mainly an experiment at this point.
I am aware of the material in natlinkmain that triggers the unload function in the natlink scripts. However, I was hoping there was another corresponding callback for shutdown or file saving.
Thanks again.
Maybe you could use a
Maybe you could use a non-Dragon scripting tool triggered by a Dragon script when you shut down.
Bruce
BruceCyr wrote: Maybe you
Maybe you could use a non-Dragon scripting tool triggered by a Dragon script when you shut down.
Bruce
that's the tricky part. I don't know how to the process just before it shuts down. I was hoping that there was some kind of unload procedure that happened upon shutdown or upon saving user files, but that does not appear to be the case.
Thanks.
Plus, I now realize, the
Plus, I now realize, the non-Dragon scripting tool wouldn't have direct access to Dragon's controls
Bruce
Christo (dragonfly
Christo (dragonfly developer) suggested changing the changeCallback in natlinkmain.py and this works by adding the following lines to the changeCallback function:
291 if loadedFiles['_repeatLast']:
292 safelyCall('_repeatLast','save_history')
so now I can trigger the 'save_history' function in _repeatsLast by piggybacking the changeCallback function.
I'm just posting this here for posterity. It is probably of marginal general-interest.