[jawsscripts] Re: jaws function to solicit input from user?

  • From: "Paul Magill" <magills@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sat, 27 Feb 2010 17:46:48 +1100

Hi Geoff,

Jaws only has a single edit field dialog function called InputBox.

Jamal, I'm pretty sure it was Jamal, developed a way for creating multiple
control dialogs to be called from Jaws scripts, but those used a third party
program/dll, which I can not instal at work, so I didn't follow that up.
From the discussion on the list at the time, I believe it was quite good.

The scripting FSDN has a book showing all the Jaws user input functions

Below is a script you may wish to try, to experiment with InputBox.

If, after entering text,  you press enter in the dialog,  the text will be
spoken/spelt, but if you press  escape, the While loop will exit.

The reason for this is, that the InputBox function returns true if you press
enter, & false if you press escape.
- the entered text is returned via the third parameter, the string variable.

Script InputBoxTest ()

VAR

STRING Text

WHILE InputBox ("Enter the sample text for the test:", "InputBox test ",
Text)

; sample uses for the entered text

SayString (Text)

SpellString (Text)

Delay (20) ; otherwise the next occurance of the box pops up too quick

LET Text = "" ; if you leave this out, the box redisplays with the previous
text. This is sometimes desirable, as it can be modified & spoken/used in
the new

EndWhile

SayString ("All done")

EndScript

Hope this helps,
Paul

----- Original Message ----- 
From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Saturday, February 27, 2010 4:09 PM
Subject: [jawsscripts] jaws function to solicit input from user?


hi mighty scripters.

wondering if someone could possibly assist me by pointing me in the right
direction for the function/functions,
which one could use to solicit input from the user, in the form of either
one or two edit boxes, with labels for the edit fields that one could
obviously design in the code maybe?
and, if feeling energetic, perhaps any further tips on how one might then
utilize that input, typed in by user, to pipe back into a string variable
for further processing?

If multi field dialogs with customizable labels isn't possible/supported
with jaws builtins,
I do know that jaws at least has functionality for at least a single edit
box field in a dialog with ok and cancel buttons, coz i've seen lots of
those in HotSpotClicker.
and I've been tooling through code trying to locate those, and how they are
utilized,
but am not having much luck finding them.
<grin.>


is there a more methodological manner of one locating functions/the tools
one needs when confronted with a question like this? or is it just a case of
good old
using and learning and knowing.
<sigh.>


thanks for any pointers anyone might have.

geoff c.

__________
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: