line number in a for each repeat
Thomas McGrath III
3mcgrath at adelphia.net
Thu Apr 21 16:17:01 EDT 2005
I am confused........
can someone help me???? Thanks
I have a for each repeat statement in my script. The global "theKeys"
holds a list of valid images that can be clicked.
If it is a valid key/image then I want to find out what line it is on
in that global since I have a field that I want to highlight that name
on that matches the global.
the target is the image short named three
global theKeys -- (contains image names "one(cr) two(cr) three(cr)
four(cr)" etc.)
if the short name of the target is among the lines of theKeys then --
(yes, the target key is "three")
put the short name of the target into thekey -- now contains "three"
repeat for each line x in theKeys
if x = theKey then -- after the third sweep it comes to x = three
-- this is where I need the actual line number that three is in
theKeys global which in this case is 3
put line x into theblend -- doesn't work
--put the line number of x of theKeys into theblend -- doesn't work
end if
end repeat
else
exit mouseUp
end if
Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541
More information about the use-livecode
mailing list