I'm not sure if I've understood the problem properly, but given a delimited list where the number of delimiters = depth then a custom sort will provide you with the lines by depth:
on mouseUp put fld "outline" into tx -- each line has 0 or more tabs to indicate outline depth sort tx descending by customSort(each) put tx end mouseUp function customSort pLine set the itemDel to tab return the number of items in pLine end customSort Assuming at least 1 line has 1 tab, then that line will be at the top of the list. Does this help you to find the starting point for the backwards search? Bernard _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
