[jawsscripts] Re: detecting numbers and returning 0 or 1.

  • From: "James Panes" <jimpanes@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 22 Jul 2009 05:47:14 -0400

Hi,

I believe that the following code will do what you want.

Include "HJConst.jsh"



Void Function Junk (string psText)

Var

Int i

Let i = StringContainsChars (psText, "123456789")

If i > 0 Then

Return TRUE

Else

Return FALSE

EndIf

EndFunction

Regards,
James

Jim
jimpanes@xxxxxxxxx
jimpanes@xxxxxxxxxxxx
"Everything is easy when you know how."

----- Original Message ----- 
From: "Jitendra" <jeet.invincible@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Tuesday, July 21, 2009 12:39 AM
Subject: [jawsscripts] detecting numbers and returning 0 or 1.


Hello friends, I am looking for a function or code suggestion which can 
return 0 or false if numbers from 1 to 9 are found in a string, if all 
numbers are 0, then it should return 1 or true,
Data could be of any type, means a string with time symbol like: 
"Colon", or a date symbol: "Slash", may be dashes as well, but it should 
be able to check the numbers and return accordingly.
Thank you, Jitendra.


__________ 
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: