[jawsscripts] Re: Retrieving segments of ini file keys

  • From: "Paul Magill" <magills@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 2 Apr 2008 20:07:33 +1000

Hi Brian,

there is no need to read the ini file again, as you have already done that, 
so it is similar to this:

LET IIndex = DlgSelectItemInList (SList, DialogTitle, False)

LET SOneLine = StringSegment (SList, "|", IIndex)

where SList is the string you read from the key,
IIndex is the returned value. 2 in your example where you hit enter on the 
second line,
SOneLine is the contents of the selected item. second segment in your 
example.

Just a side note to remember, that a maximum of 256 characters can be read 
from a key.

Hope this helps,
Paul from Aust

----- Original Message ----- 
From: "Brian Hartgen" <jaws@xxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Wednesday, April 02, 2008 5:51 PM
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: