>Use the formattedHeight function to determine how far down you need to go.
>You can ask for the formattedHeight of a chunk of text, e.g.:
>
>the formattedHeight of line 1 to 60 of fld 1
>
>Note that selecting the text by script will also scroll the field. (If you
>have any trouble putting together a script that scrolls exactly as you want
>with formattedHeight, please let me know: we've got one "somewhere".)
>
>Regards,
>
>Kevin
I managed to get the effect I anted using the very inelegant approach
of cloning the field, throwing away the bottom part and measuring the
height of the remaining lines! The script is as follows:
on gotoLine theLine,theField
lock screen
if there is a field "Scratch" then delete field "Scratch"
clone field theField
set the name of field id (word 3 of it) to "Scratch"
delete line theLine-2 to -1 of field "Scratch"
put the formattedHeight of field "Scratch" into thePosn
hide field "Scratch"
set the vScroll of field theField to thePosn
choose browse tool
unlock screen
end gotoLine
Not very clever, but it works! Any suggestions for something more
elegant would be greatly appreciated.
Best regards
Peter
--------------------------------------------------------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk