Oops, the snip I send, had an error in it. Here is the correct line, but it 
doesn't work:

 If InStr(OriginalString, "/") Then OriginalString = "Fractional, " & 
OriginalString

Speak "Fractional, is running."
  ----- Original Message ----- 
  From: David 
  To: [email protected] 
  Sent: Sunday, August 21, 2011 12:18 AM
  Subject: Guess I am on the wrong Event?


  Hi scripters,
  I am trying to make an app that handles fractional numbers. That is, have it 
speak the word "Fractional", when it reaches numbers like 1/4. Below is a snip 
of my code. My thought was to connect to the Speech/OnSpeak event, and simply 
check if there is a SLASH in the original string. But that seems not to work. 
When things like 1/2, 2/3 or 3/4 occurs, it seems that the OnSpeak string is 
broken into two seperate strings, by Window-Eyes. Not sure why GW would do such 
a thing, but that seems to be the case. In other words, the 1/3, will be broken 
into two strings: "1", and "3". This causes, far as I can see, Window-Eyes not 
to ever 'see' the slash inbetween; hence my code never works.

  Am I connecting to the wrong event? Is there a better approach to the matter?

  ---Snip of code---
  ConnectEvent Speech, "OnSpeak", "MOnSpeak"

  Function MOnSpeak( OriginalString )
   If InStr(OriginalString, "4") Then OriginalString = "Fractional, " & 
OriginalString
   MOnSpeak = OriginalString
  End Function 'MOnSpeak.
  ----End of snip----
  Speak "Fractional, is running."

Reply via email to