[jawsscripts] chopping up block of text on Tab delimiters or via color? String monipulation,

  • From: "Geoff personal" <gch@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 23 Mar 2009 12:19:55 +1100

aha Mighty Scripters.

I wonder if someone might be able to assist me with some fancy string 
monipulation knowledge?
I have a problem in a terminal emulation environment application I am 
scripting, whereby there's this whole 3 line block of helper text for the 
user , denoting the role of the function keys on any given screen.
However of course, they don't have nice periods after each one, nor even 
commas, so speaking a GetTextInRect on the block of course just spiews them 
all out in one unpleasantly incomprehensible continuous stream of text.
However of course on each screen, the length of each function key 
prompt/string of text which needs pauses inserted between them, and which I 
wish also to split up to place one below the other in the virtual viewer 
upon a double click of this key,
alters!  Such that I can't just successfully delineate things with simple 
static GetTextInRect functions.

So, what I'm wondering, is, what other options might be available to me to 
do this?
Now there are what Jaws identifies as, Tabs, sitting between each one, which 
I was thinking if I knew how to get functions to do something like this:
take the block of text, then move along till you find the first tab, then 
chop that from the left and assign it to a string,
then move along to the next piece of actual text, starting counting from 
there, then when you reach the next Tab, chop that out and assign it to some 
string, ... etc, I thought I could then achieve this.
But, I've no idea how I might go about doing this? I'm not at all really 
adept yet at handling the return values of functions, and feeding them into 
new new functions
as parameters upon which the next function acts? Which I'm fairly sure is 
what I'm going to be needing to be able to do, in order to achieve this one?

Or, the other thought I had was to maybe delineate by color instead.
All the actual text in the block, is CornFlower blue on Black. i.e, in 
integer land,
15765624 on 0.
Whereas the Tabs in between each helper prompt string that I wish to insert 
pauses into and be able to deal with individually in virtual viewer,
is the standard Lime Green on Black terminal emulation color. i.e. in 
integer land,
3201060 on 0.
Though interestingly, even with Hsc ReadPixel Color command, I'm unable to 
find any pixels in my tab identified spot, that report themselves as that 
Lime green color, even though JawsKey+top row 5, reports the tab as Lime 
Green on black.

Might I be able to utilize something which looked for color instead, to 
achieve what I'm after?
What would people suggest might be the bestest approach for this.

Thanks so much for any tips or exemplery code anyone might have time to 
throw up at me on this one.

geoff c.



__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: