Hi Chip,
I don't think there's any way of being able to tell if window-eyes is actually
speaking, but here's a little routine I came up with ages ago for something or
other I was messing about with. I don't know if it's actually what you want,
or how good it might fare in a complexed script but here goes, and bearing in
mind you are a far better scripter than me smile..
begin Vbscript
' press "l" to start loop space to stop
Dim KeyFlag
Dim Counter : Counter = 0
Dim hk, sc
Set hk = Keyboard.RegisterHotkey("l", "StartCount")
Set sc = Keyboard.RegisterHotkey("space", "StopCount")
Sub StartCount()
KeyFlag = False
If Not KeyFlag And Counter = 0 Then
Counter = 0
Count
End If
End Sub
Sub StopCount()
KeyFlag = True
Counter = 0
End Sub
Sub Count()
Do While Not Counter = 10 And Not KeyFlag
Counter = Counter + 1
Speak Counter
Sleep 1000
Loop
Counter = 0
KeyFlag = False
End Sub
Warm regards.
Martin Webster.
--- On Sun, 11/21/10, Chip Orange <[email protected]> wrote:
> From: Chip Orange <[email protected]>
> Subject: RE: how to tell if the silence key was just pressed?
> To: [email protected]
> Date: Sunday, November 21, 2010, 5:36 PM
> hi again,
>
> to try and answer my own question: I've settled for now on
> trying to use the
> keyboard onKeyProcessedDown event; figuring any time a key
> is pressed is
> probably a good bet speech is interrupted, and almost the
> only way speech is
> interrupted. I haven't programmed it yet to see how
> well it works, but for
> anyone else who might need this, I thought I'd throw out my
> thoughts.
>
> Chip
>
>
> -----Original Message-----
> From: Chip Orange [mailto:[email protected]]
>
> Sent: Saturday, November 20, 2010 10:37 PM
> To: [email protected]
> Subject: how to tell if the silence key was just pressed?
>
> Hi all,
>
> I need to stop what I'm doing in my script, if the user
> presses the silence
> key, or even better, if he does anything which interrupts
> speech at all.
>
> does anyone have any ideas on how I may detect either of
> these two events
> occurring?
>
> thanks.
>
> Chip
>
>