[jawsscripts] Re: JAWS script for Notepad

  • From: jeremy.richards7@xxxxxxxxx
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 19 Aug 2019 22:37:40 -0700

Thank you Paul for your tip. I implemented it in my script, and at each press 
of F3 the same word was found. I'm assuming this is because the PriorWord () 
script made Notepad search and find the same word over and over. 

I did end up using a variant of your suggestion in the following final script: 

Script FindInNotepad ()
;Script to use find in Notepad then speak the line where the word is found. 

TypeCurrentScriptKey ()
Pause () 
NextCharacter ()
PerformScript SayLine()
EndScript

I used the JAWS SaySelectedText hotkey (JawsKey+Shift+DownArrow)  after every 
search to insure nothing is selected. 

Thanks, 

JR 

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx <jawsscripts-bounce@xxxxxxxxxxxxx> On 
Behalf Of Paul Magill
Sent: Monday, August 19, 2019 2:59 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: JAWS script for Notepad 


Hi Jeremy,

If you intend to learn some scripting, then follow Jackie's advice, as she is 
much more experienced than me.

But if you just want a quick fix to this problem, then the below script is what 
I was using before I retired from work.

Just copy and paste it into the notepad file, and tidy up any "rubbish" 
introduced by the email process.

Note, it is necessary to add the F3 keystroke in the, Assign to, field.

Note 2, the PriorWord () line is advisable, because it removes the highlighting 
of the found word caused by the Notepad F3 command.  If not removed, then any 
character key that may be pressed, or bumped, will replace the found word.

Regards,
Paul in Australia.

Script FindNextAndRead ()
SayCurrentScriptKeyLabel () ; optional, leave out if not wanted 
TypeCurrentScriptKey () Pause () Delay (1) Pause () PriorWord () Pause () 
SayLine ()

EndScript



 

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of ;
jeremy.richards7@xxxxxxxxx
Sent: Sunday, 18 August 2019 1:14 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] JAWS script for Notepad 

Hi all, 
 
I’m a total JAWS scripting beginner. With that said, before I spend tons of 
time on a script which can’t be done… 
 
Can I launch notepad then run a search for a word and have jaws speak the line 
on which the word was found? 
 
For example, I want to find the word zebra within a text file in Notepad. 
 
I’m going to go to the top of the file before beginning my search. 
 
I’m going to press Control+F to launch the Notepad find. 
 
I’m going to enter the word Zebra and press enter. 
 
When the first occurrence of the word Zebra is found, I’m going to press 
Escape to close the Notepad search. 
 
Now that the Notepad search has been closed, I want to continue searching the 
document by pressing the F3 key. As is, JAWS will not speak anything when the 
second occurrence of the word Zebra has been found. 
 
I would like to write a script which speaks each line which contains the word 
Zebra. That is, when I press F3 and the word is found, I want JAWS to read the 
line so I know when I’ve found my desired spot within the document. 
 
As is, when pressing F3 in Notepad and successive occurrences of the word Zebra 
are found, JAWS does not say anything, and I have to use the SayLine command to 
get some sort of context as to where I am in the document. I use notepad all 
day and every day to search for context, and this process really, really slows 
me down, which is why I want to streamline this process. 
 
Again, can one write a script so JAWS speaks the line on which the word Zebra 
is found once F3 is pressed? 
 
Since I’m a new scripter, if this feature already exists on a different 
application such as Notepad++, please let me know as I might as well make life 
easy on myself as well as preventing scripting headaches for myself. ðŸ˜Š 
 
Thanks, 
 
JR 
 
__________�

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

Other related posts: