[jawsscripts] ScheduleFunction: why does compiler complain?

  • From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 27 Nov 2013 04:07:01 +1100

Wondering if anyone can clear up a small mystery I'm having here.
I know there's some deal about ScheduleFunctions, and what they will and won't 
accept, but I've just forgotten what it exactly is now, and I need a little 
straightening out. :)

In an effort to reduce multiple triggerings in NewTextEvent with a specialized 
situation,
Where I'm wanting jaws to check when a certain window class has appeared, at a 
successful Combo box activation,
And when it does, to do two things:
(a) get jaws to say Popup, just once, i.e. not repeat it every time one upDown 
arrows and the item you've left, and the item you're moving to, gets redrawn,
and
(b) speak the entire text of that comboBox window, just at present for my 
debugging purposes, again only the once.
Eventually of course I wouldn't need either of those, just for it to speak the 
first highlighted item, and read the next one as arrowed to, as per normal.

Now if I just put a line:
SayString ("popup")
in my if condition for checking for this combo box class window to appear, then 
it'll 
speak that for each item it initially writes into the combobox window, in this 
case 5 times, and so I thought Scheduling it, might be a way of eliminating 
that multiple triggering situation.
However, when I write:
ScheduleFunction ("SayString ("PopUp")", 1)
The compiler doesn't like me, and will return, "unexpected word PopUp."

So my questions are:
1. Is it the deal then, that you can't put quoted strings into a 
ScheduleFunction call like my above example?
But, that you can do it, if the string text is already inside a variable? like:
ScheduleFunction ("SayString (buffer)", 1)
Which certainly appears to be the case. Does anyone know why? though that is 
rather an irrelevant question I guess.

2. Sometimes, when attempting to use ScheduleFunction calls, in a bid to 
eliminate multiple triggerings of something I want the user to hear, inside 
NewTextEvent, occasionally the lowest second parameter for ScheduleFunction,
, 1, seems to eliminate the thing from speaking altogether.  Whereas if there's 
a straight ahead wach for a string, then a
SayString (buffer)
it may speak it multiple times.
Has anyone got any more sophisticated ideas for how one may get around this 
kind of problem?

Thanks much for any tips.

Regards
Geoff C.

__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: