[jawsscripts] Re: Retrieving segments of ini file keys

  • From: "Smith, Alice A. HQ DCO" <Alice.A.Smith@xxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 2 Apr 2008 09:15:01 -0400

DLGSelectItemInList returns an integer indicating what line is selected.
You can use that integer with your "whatever" string and pull out the
section you want with StringSegment like so:
StringSegment(sSegment, "|", 2) where 2 is the line of text you want.

Alice
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Brian Hartgen
Sent: Wednesday, April 02, 2008 3:52 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Retrieving segments of ini file keys

Hi

I was yesterday trying to create intuitive access for someone to some
on-screen data and came against a problem which I wonder if anyone could
maybe help to solve.

I have data within an ini file.  The file contains a section of course,
together with a key within the section.  The key itself contains at
least six lines of text, each separated by a vertical bar which is
necessary for formulating the contents of the key into a list box.  

When the script is launched to gather the information, it uses the
INIReadString function to read the appropriate section and key from the
ini file, and presents the data in a list box using DLGSelectItemInList.
All of that works perfectly and the items are nicely presented in the
list.  When I arrow down to the required item and press Enter, the index
position is correctly recalled.

However, when I press Enter on an item, I want that particular segment
of the key to be recalled and acted upon.  For example, if I arrow down
to the second item in the list and press Enter, I want the second
segment of the key (IE the second line) to be spoken.  I guess my
question is how can I get the appropriate segment of the ini file
returned as a string?  If I use Let whatever = IniReadString (section,
key, "", FileName) That Will retrieve everything within the key rather
than the segment.

I hope someone is able to help with that please.

Thank you.

Brian Hartgen


__________
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: