[jawsscripts] Re: speeking message at start
- From: "Sean Randall" <seanr@xxxxxxxxxxxxxxx>
- To: <jawsscripts@xxxxxxxxxxxxx>
- Date: Wed, 8 Apr 2009 17:43:23 +0100
Haden,
To make a message speak when an application gains focus seems to be what
you've done. AutoStartEvent gets called whenever you enter the application,
regardless of how often that is.
You can use a global variable to keep track of whether or not the message
has been spoken - global variables only get reset when JAWS is restarted.
An example:
;--code begins
Globals
Int iAppFirstTime
Void function autoStartEvent()
If (iAppFirstTime == 0) then
;we haven't spoken our message yet
Say("text... Etc...",ot_ap_start)
Let iAppFirstTime = 1
endIf
EndFunction
;--code ends.
I haven't tested this in a compiler and am writing in Ms Word so apologies
if there are any errors. The say function should obviously be customized to
your usage.
On the matter of speaking when a window gains focus, there are several ways
depending on what you want to do. The simplest is to try creating a custom
prompt for the control (ctrl+insert+tab on the appropriate area) and enter
the text you want spoken.
There are a number of events like focusChanged, WindowCreated and
dialogPageChanged that may be called, depending upon where focus goes in
your application.
Sean.
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Haden Pike
Sent: Wednesday, April 08, 2009 3:27 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: speeking message at start
Hi Jitendra. I can't get the message to only speak when the program starts.
I used the SayFormattedMessage function with the out-put type as
OT_APP_start. Do I need to use a differend output type.
Also, about my second question, what I mean is that I want jaws to speak a
message after it speaks the name of the window when move to it.
Thanks.
__________
Visit and contribute to The JAWS Script Repository http://jawsscripts.com
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
Other related posts: