[jawsscripts] Re: An Excel script

  • From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
  • To: "JAWSScripts" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 10 Sep 2009 23:57:24 +0100

Marlon,

  The JAWS function GetRowText can be called to produce a delimited string
of all the text in the active row of the table.  You can then specify which
cell's contents to speak using the StringSegment function as below:

Script testExcel ()
Var string sLine

let sLine = GetRowText ("|", "c%1r%2", "nothing found", 1, 26)
;let sLine = GetRowText ("|", "", "nothing found")
SayString (StringSegment (sLine, "|", 20))

EndScript


  You can use either form of the GetRowText function above, either 
specifying everything (include each cell's coordinates in the string as well 
as how much of the row to read), or accept the default options of no 
coordinates and read the whole row.

  If you need to specify the column by letter, you could compare your letter 
with a string of characters, say "a|b|c| ... |zz" using StringSegmentIndex 
until you found the match and then enter that number in the above code.

  hth

Martin


----- Original Message ----- 
From: "Marlon Brandão de Sousa" <splyt.lists@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, September 10, 2009 9:46 PM
Subject: [jawsscripts] Re: An Excel script


> That's also what I would like to know.
> I want to implement a kind of monitor cell that is relative to the
> line one currently is placed, so that if they are whatching for
> collumn t for example they can be anywhere in line 2 and pressing a
> keystroke the t2 cell would be read and if they are in anywhere in
> line 135 and press the same command the t135 cell will be read and so
> on.
> I can code a function like numberToLetter and use it, but cinse JAWS
> can say the coordinates of a given cell then I also can use this
> information in my scripts. We just need to figure out or be helped as
> to how to get this information.
> Marlon
>
> 2009/9/10, Reed Poynter <reed.poynter@xxxxxxxxx>:
>> Hi Scripters,
>>
>> In Ms Excel 2003, there is a Go To dialog where you can select blocks of
>> data based on a top left and a bottom right cell.
>> For example, in a spreadsheet, you hit F5 and specify A1:G6 and hit
>> enter.
>> The block of data is selected.
>>
>> I want to be able to do the following.
>> Go to the top left cell and hit a key to save its coordinates, go to the
>> bottom right cell, hit a second key to save its coordinates, put the 2
>> saved
>> coordinates together in a string and put it into the go to dialog.
>>
>> I don't know of anything in Excel that will do this for me.  So, I
>> thought
>> I'd write a JFW script to do it.
>>
>> I think my process would be to, with a hot key, save the coordinates of
>> the
>> top left cell to the clipboard,
>> With a second hot key, capture the bottom cell coordinates, and put them
>> together into a string with the first coordinates once retrieved from the
>> clipboard.
>> Save this new string to the clipboard,
>> Open Excel's Go To dialog and paste in my coordinates.
>>
>> My first problem is having the script determine the cell coordinates.
>> Looking through the functions in the Script Manager, the only guy I see
>> is
>> GetCellCoordinates.
>> If I am sitting on cell A5,  GetCellCoordinates (x, y) returns integers 1
>> and 5.
>> I need something that will give me a5.
>> Any suggestions?
>>
>>
>> Thanks.
>>
>> Reed
>>
>>
>> __________
>> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>>
>> View the list's information and change your settings at
>> //www.freelists.org/list/jawsscripts
>>
>>
>
>
> -- 
> When you say "I wrote a program that crashed Windows," people just
> stare at you blankly and say "Hey, I got those with the system, for
> free."
> Linus Torvalds
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.89/2360 - Release Date: 09/10/09
11:29:00

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

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

Other related posts: