Re: [orca-list] script to say current time
- From: Willie Walker <William Walker Sun COM>
- To: Rui Batista <ruiandrebatista gmail com>
- Cc: orca-list gnome org
- Subject: Re: [orca-list] script to say current time
- Date: Wed, 13 Jun 2007 20:32:06 -0400
Placing the following lines in ~/.orca/orca-customizations.py (creating
it if necessary) should work:
import orca.input_event
import orca.keybindings
import orca.orca
import orca.speech
import orca.braille
import re
myKeyBindings = orca.keybindings.KeyBindings()
def sayTime(script, inputEvent=None):
import time
message = time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime())
orca.speech.speak(message)
orca.braille.displayMessage(message)
return True
sayTimeHandler = orca.input_event.InputEventHandler(
sayTime,
"Presents the time.")
myKeyBindings.add(orca.keybindings.KeyBinding(
"t",
1 << orca.settings.MODIFIER_ORCA,
1 << orca.settings.MODIFIER_ORCA,
sayTimeHandler))
orca.settings.keyBindingsMap["default"] = myKeyBindings
# Hope this helps,
# Will
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]