home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invenzioni E Inventori 1: Lavoro E Vita Quotidiana
/
invenzioni-inventori-1.iso
/
mac
/
Invenzio
/
index.dir
/
00050_Script_50
< prev
next >
Wrap
Text File
|
1997-10-15
|
960b
|
36 lines
on chartoline nochar,testo,casuale
set indice to field (testo&".idx")
set r to 0
set a to 0
-- startTimer
if casuale then
set rigappr to nochar / (the number of chars in field testo / the number of lines in field testo)
if rigappr < 15 then
set rigappr to 1
else
set inc to 0
repeat while 0 = 0
if item 2 of line rigappr-inc of indice < nochar and item 2 of line rigappr-inc of indice <> 0 then
set rigappr to rigappr - inc
set r to item 2 of line rigappr-1 of indice
exit repeat
else
set inc to inc + 10
end if
end repeat
end if
else
set rigappr to 1
end if
repeat with a = rigappr to (the number of lines in indice)
set r to r + (integer(item 1 of line a of indice)+1)
if r > nochar then exit repeat
end repeat
-- put the timer
-- put a
return a
set indice to ""
end cosa