[jawsscripts] Re: When using JawsFindNext in a script, How to prevent it from wrapping to Top in IE,? Or at least programatically how to determine that it has wrapped?

  • From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
  • To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 12 Feb 2020 12:06:08 +1100

Wow! OK! Thanks Udo for this idea, I will go experiment with this now and see 
if it functions in virtual realm.


BTW, I did not see either of the posts I made yesterday, come bback to my inbox 
from the list, so wasn't at all sure, that they got out there.  In fact I 
haven't seen any posts from this list in the last several days. is anyone else 
having any suspected lower-traffic than normal issues here? Or is it just at my 
end?

Thanks much again for the idea Udo.


----- Original Message -----
From: Udo Egner-Walter <udo.egner-walter@xxxxxx>
Reply-To: <jawsscripts@xxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: 12/02/2020 12:23:49 AM
Subject: [jawsscripts] Re: When using JawsFindNext in a script, How to prevent 
it from wrapping to Top in IE,? Or at least programatically how to determine 
that it has wrapped?
________________________________________________________________________________

Hi Geoff, 
why not use the FindString-Function? I have not tested this but I think it 
should work in IE. 

<Code>

var
string sStringToFind = "MyString"
if FindString (GetFocus (), sStringToFind, S_NEXT, S_RESTRICTED, True) then
SayString ("found")
else
SayString ("not found")
EndIf 

<Code End>

You can change GetFocus() To GetRealWindow(GetFocus()) if it doesn't work. 

Or S_RESTRICTED (which searches in the given window) to S_UNRESTRICTED (wich 
searches the whole App)

The constant S_NEXT searches only the next string to find, you can have a look 
in HKConst for other variables. 

Hope this helps
Udo 


Am 11.02.2020 um 13:00 schrieb Geoff Chapman <gch@xxxxxxxxxxxxxxxx>:

Hello Scripters.

Today, I'm needing to do something which *should* be incredibly Simple! But 
... as usual, is completely stumping me! :(.
GRRR!

OK, so, By Default, it appears the JawsFindNext ()
Function, (which seems to be a builtin with no parameters,) will continually 
"wrap to top" when utilised.
Well, inside the IE Browser, in a while loop, I'm needing to just search the 
current page once through, and then stop, That is, not wrrap to top,
for as many instances as it finds of specific text, that I've designated in 
SetJawsFindText ().
Or, at the very least, have some way of my being able to determine that it 
has wrapped to top, so that I can use that information to exit the while loop
and stop the search.
But, although I know that somehow that function certainly does know when it 
is wrapping to top,
for it says so, and also makes an alert ding sound!
For the life of me, I'm somehow simply unable to determine how it knows that, 
and/or, how I can stop it in my particular application.
Or, snaffle that knowledge in my own script so that I can effectively use 
that to stop my while loop searchings.

If anyone could assist me to solve what should be such a simple problem, 
and/or the methodology for how I should go aboutt determining this for myself,
it would be most warmly appreciated!

I have another related question but I shall post that in a separate thread.

with kind regards

Geoff C.


__________���

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: