[jawsscripts] Re: S_PRIOR doesn't work the way it should

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Thu, 3 Mar 2011 10:31:46 -0500

Any SaveCursor() call you make and don't reverse yourself will be
reversed when your script or function exits.  Put another way, if you
call SaveCursor() in a script or function, the cursor is saved only until that
script or function exits, or until you call RestoreCursor(), whichever
comes first.  Think of SaveCursor() as putting something on the script
or function's stack, along with its local variables.  When the script
or function exits, its stacked is cleaned up.

On Thu, Mar 03, 2011 at 09:50:15AM -0500, Homme, James wrote:
Hi Raymond,
Try this bit of logic.

This assumes the PC cursor is on when you start your script.

Note that when you save and restore cursors, you have to restore them in 
reverse order. Also, I forget which functions automatically restore cursors, so 
I always restore them myself.

Below is untested code.


SaveCursor() ; Saves the location of the PC cursor
InvisibleCursor()
SaveCursor() ; Save invisible cursor location
RoutInvisibleToPC()
PriorWord()
NextCharacter()
let found = FindString(sString, s_Prior) ; try to put invisible cursor there.
if found then ; The invisible cursor is in the right place.
RoutPCToInvisible() ; Put the PC cursor there.
PcCursor() ; Activate PC Cursor.
RestoreCursor() ; Pop the PC Cursor location off the stack.
else
RestoreCursor() ; Put the PC cursor where it was
EndIf
RestoreCursor() ; Put the invisible cursor back where it was

Jim

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Raymond
Sent: Thursday, March 03, 2011 9:30 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: S_PRIOR doesn't work the way it should

Hi Tony,

I can't use the SaveCursor/RestoreCursor functions because the FindString
with s_next and the one with s_prior are attached  to a key. And pressing
this key should bring you each time to the next or prior occurrence.

Cheers,

Raymond

----- Original Message -----
From: "Tony Hernandez" <tonyhspeaks@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, March 03, 2011 3:13 PM
Subject: [jawsscripts] Re: S_PRIOR doesn't work the way it should


> Hi. Raymond. Ditto on Don's response. Perhaps it would help to route all
> your cursors to the same location if possible, with the probable exception
> of the PC Cursor if it can't go to the location of your starting point.
> this
> would all be after calling SaveCursor () and before calling RestoreCursor
> ().
>
> Tony Hernandez
> http://dutyofman.net/
> Let us hear the conclusion of the whole matter: Fear God, and keep His
> commandments, for this is the whole duty of man. For God shall bring every
> work into judgment, with every secret thing, whether it be good, or
> whether
> it be evil. (Ecclesiastes 12:13-14)
>
>
> -----Original Message-----
> From: jawsscripts-bounce@xxxxxxxxxxxxx
> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Raymond
> Sent: Thursday, March 03, 2011 9:05 AM
> To: jawsscripts@xxxxxxxxxxxxx
> Subject: [jawsscripts] Re: S_PRIOR doesn't work the way it should
>
> Hi Don,
>
> Ok thanks.
> I'll report it to FS.
>
> Cheers,
>
> Raymond
>
> ----- Original Message -----
> From: "Don Marang" <donald.marang@xxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Thursday, March 03, 2011 3:00 PM
> Subject: [jawsscripts] Re: S_PRIOR doesn't work the way it should
>
>
>>I think it is a known bug.  I would report it to FS anyway.  I think you
>> will find that function very temperamental, so be careful when using it.
>> Sometimes it is necessary, but limit the situations in which you use it
>> so
>> that you do not get unexpected results.  I think the current location of
>> various cursors has a major impact on whether you get the expected
>> outcome.
>>
>> Don Marang
>> Vinux Software Development Coordinator (vinux.org.uk)
>>
>> There is just so much stuff in the world that, to me, is devoid of any
>> real
>> substance, value, and content that I just try to make sure that I am
>> working
>> on things that matter.
>> Dean Kamen
>>
>>
>> --------------------------------------------------
>> From: "Raymond" <r.jansen@xxxxxxxxxx>
>> Sent: Thursday, March 03, 2011 8:46 AM
>> To: <jawsscripts@xxxxxxxxxxxxx>
>> Subject: [jawsscripts] S_PRIOR doesn't work the way it should
>>
>>> Hi all,
>>>
>>> As you all know, you have 4 direction to choose from when using the
>>> FindString function.
>>>
>>> s_top, s_bottom, s_next and s_prior.
>>>
>>> s_top finds the first string from top to bottom.
>>> s_bottom finds the first string from bottom to top.
>>> s_next finds the next string from the current location to the bottom.
>>> s_prior should find the prior string from the current location to the
>>> top.
>>>
>>> But s_prior doesn't work correctly when you start on the same string you
>>> are
>>> searching for. It just finds the same string on the same location. You
>>> first
>>> have to move the Jaws Cursor 1 character to the left.
>>>
>>> Is this a known bug? Or is it a normal behaviour and is it my way of
>>> thinking :)
>>>
>>> Cheers,
>>>
>>> Raymond
>>>
>>>
>>>
>>>
>>>
>>> __________???
>>>
>>> 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
>>
>>
>
> __________???
>
> 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
>
>

__________???

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


This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed.  If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it.  If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
 The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.
__________???

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: