Indulge me, please, just one more time. (Fixes redundant and broken
button handling.)
Ken
local fn ForwardReverse( whichWay as str15 )
dim as integer i, a, b, nlines
dim as handle efH
a = 0 : b = 0
appearance button 2
select case whichWay
case "reverse" : gDirection--
case "forward" : gDirection++
end select
if gDirection =< 1 then gDirection = 1
if gDirection => 16 then gDirection = 16
if gDirection = 1 then a = 1 : b = 499 : appearance Button 2
if gDirection = 2 then a = 500 : b = 999
if gDirection = 3 then a = 1000 : b = 1499
if gDirection = 4 then a = 1500 : b = 1999
if gDirection = 5 then a = 2000 : b = 2499
if gDirection = 6 then a = 2500 : b = 2999
if gDirection = 7 then a = 3000 : b = 3499
if gDirection = 8 then a = 3500 : b = 3999
if gDirection = 9 then a = 4000 : b = 4499
if gDirection = 10 then a = 4500 : b = 4999
if gDirection = 11 then a = 5000 : b = 5499
if gDirection = 12 then a = 5500 : b = 5999
if gDirection = 13 then a = 6000 : b = 6499
if gDirection = 14 then a = 6500 : b = 6999
if gDirection = 15 then a = 7000 : b = 7499
if gDirection = 16 then a = 7500 : b = 8000
gC = ""
for i = a to b
long if len(dictStr(i)) > 1
gC += dictStr(i) + chr$(13)
xelse
exit for
end if
next i
edit$(10) = #gC
efH = tehandle(10)
IF efH != 0 then nlines = efH..teNLines%
long if FN UBound(dictStr) => 500
long if nlines = 500
appearance button 3
xelse
long if gDirection = 1
appearance button -2
xelse
appearance button -3
end if
end if
end if
gC = ""
edit field 0
end fn