[jawsscripts] Re: Find string function with two strings?

  • From: "David Farough" <David.Farough@xxxxxxxxxxxxx>
  • To: "JawsScriptsList" <JawsScripts@xxxxxxxxxxxxx>
  • Date: Tue, 15 Jan 2008 10:14:40 -0500

Hi Jeet:

You can use the || double vertical bar operator to specify your second
search string.  This is like saying if Findstring (First string ) or
findstring (second string ) then do something. 

Your code could look something like this:
If FindString (GetCurrentWindow (), "Welcome", s_Bottom,
S_Unrestricted)
||  FindString (GetCurrentWindow (), "Initialising", s_Bottom,
S_Unrestricted) then 
NextWord ()
endif
GetWord ()

You could also use the else option in your if statement to specify
actions to take if one of the strings is not found.

this would look like this: 
If FindString (GetCurrentWindow (), "Welcome", s_Bottom,
S_Unrestricted)
||  FindString (GetCurrentWindow (), "Initialising", s_Bottom,
S_Unrestricted) then 
NextWord ()
else 
do something else 
endif


David Farough
Application Accessibility Coordinator/coordonateur de l'accessibilité 
Information Technology Services Directorate /
Direction des services d'information technologiques
Public Service Commission / Commission de la fonction publique
Email / Courriel:  David.Farough@xxxxxxxxxxxxx
Tel. / Tél:    (613) 992-2779 

>>> Jeet <LoveForAll@xxxxxxxxxxxxxx> 02:51 am Tuesday, January 15, 2008
>>>
Hello friends, my code looks:
If FindString (GetCurrentWindow (), "Welcome", s_Bottom,
S_Unrestricted) then

;Another string I want to find: "Initialising", should I re-type-in the
line above with new string, or any other way to find any of these two
string, and do the function below?
and where should I put Endif?
NextWord ()
EndIf
GetWord ()
Thank you.

-- 
Contact:
Direct-cell: +919213153776
Skype:
Jeet.delhi
"The Scourge Of Authoritarianism Is Intellectualism."

----------------------------------------------------------------------
Free pop3 email with a spam filter.
http://www.bluebottle.com/tag/5 

__________ 
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

Other related posts: