list linking

edward cawley etcawley at fastmail.fm
Sat Nov 8 13:13:28 EST 2008


I'm trying to convert from old hyperCard stacks to Rev. stacks.
I think I may be able to improve the scripts but I've been having  
problems.
I have a list of plant names that I want to click on and go to a card  
with that name.
I have tried this script:
     on mousedown
    local x, xxx
--lock screen
--Use this script to capture a line of text in a variable
--field must be LOCKED

   set the listBehavior of field "flora-cn" to true
set the visible of field 1 to true
set the locktext of me to true
put  clickLine() into x
put the selectedtext  of line x of bkgnd field "Flora-CN" of group id  
2589 of card id 3064 of stack "/Users/ecawley/Documents/River- 
main.rev" into xxx
set the locktext of me to true
set the visible of field 1 to false
unlock screen
--text is in xxx now and you may do anything you wish with it
push card
go to card xxx
end mousedown

I think that the problem is in the format of clickLine() and the  
selectedText.

Is this the best approach?




More information about the use-livecode mailing list