[jawsscripts] Re: Function for verifying the contents of a variable.

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Thu, 2 Feb 2012 11:37:18 -0500

The idea behind my first post on this thread was for you to try this:

if typeOf(getWord()) == "int" then
        ; Int-related stuff.
else  ; string
        ; String-related stuff.
endIf

On Thu, Feb 02, 2012 at 11:11:17AM -0500, Saylien Brown wrote:
It's a block of text that is retrieved by using the GetWord () function.

So my script would say:

If (GetWord () == Number) Then
Do the following...
ElIf (GetWord () == Text) Then
Do the following...
EndIf

So functions like StringContains and 
StringCompare aren't quite what I'm looking for. 
I want a function that will check to see if the 
entire contents of GetWord () is a number or text string.

At 10:56 AM 2/2/2012, you wrote:
>Saylien, it depends on how u initially defined the variable. If u
>defined it as a string, then it's a string. If u defined it as a
>handle or integer, then it's an integer.
>
>Now--if u mean whether or not the text contained in a string is a
>number, u can use StringToInt or StringContainsChars.
>
>On 2/2/12, Saylien Brown <saybro@xxxxxxxxx> wrote:
> > Hello,
> >
> > I'm using the latest build of JAWS 13 under Windows 7.
> >
> > Does anyone know if there is a JAWS function for confirming if the
> > value stored in a variable is a number or text string? Sure there is,
> > but looking through the list of over 250 functions to find it has my
> > head spinning.
> >
> > Thanks for any help.
> >
> > __________???
> >
> > View the list's information and change your settings at
> > //www.freelists.org/list/jawsscripts
> >
> >
>
>
>--
>Blame the computer--why not? It can't defend itself & occasionally
>might even be the culprit
>Jackie McBride
>Ask Me Computer Questions at: www.pcinquirer.com
>Jaws Scripting training materials: www.screenreaderscripting.com
>homePage: www.abletec.serverheaven.net
>__________???
>
>View the list's information and change your settings at
>//www.freelists.org/list/jawsscripts

__________???

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

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________�

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

Other related posts: