[jawsscripts] Re: Strange limitation with StringSegment function

  • From: "Geoff Chapman" <gch@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 28 Jul 2016 01:19:40 +1000

This 4000 limit also sounds vaguely familiar to me Doug, though, I too 
cannot recall why/where...

----- Original Message ----- 
From: "Paul Magill" <magills@xxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, July 25, 2016 4:40 PM
Subject: [jawsscripts] Strange limitation with StringSegment function


Hi All,


I have a script to read a text file into a string variable, and then to be
able to address each line in it, by using the lineFeed character 
backslashN
as the delimiter in a StringSegment statement.



It works quite well, until segment 3999.  Segment 4000 then contains all 
the
remaining segments, and any request for a segment higher than 4000 returns
only a nul string.



I thought it may have been because of the non standard backslashN 
delimiter,
so I used the below script to test the StringSegment function, using the
standard LIST_ITEM_SEPARATOR, and the function repeatedly fails at segment
4000, regardless of each segments size, and which delimiter is used.



Has anyone encountered this?



Could someone please look at the below test script, and let me know if, 
when
you enter a line number higher than 3999, whether you get a sensible 
result,
and if so, what my problem may be?



Note, entering a line number into the input box should read the segment 
for
that number, and pressing escape escapes the while loop.





Script Test () ; F8

var

int  iCount,

string   sChoice,

string   sText



For iCount = 1 to 5000

let sText = sText + IntToString (iCount) + " ABC DEF GHI JKL MNOP QURS TUV
WXY Z " + LIST_ITEM_SEPARATOR

endFor



WHILE InputBox ("line", "   ", sChoice)

let iCount = StringToInt (sChoice)

SayString (StringSegment (sText, LIST_ITEM_SEPARATOR, iCount))

EndWhile

EndScript



With appreciation,

Paul from Australia





__________�

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: