This doesn't work with block comments, but this is what I used in revNavigator: put the script of tID into tText put empty into tMenuText repeat for each line L in tText if word 1 of L is among the items of "on,function,getprop,setprop" then put L & cr after tMenuText end repeat