-- lousy.lua (requires iNMR 2.4.3) -- List Of User Selected cross-peaks -- writes a list of cross peaks from existing frames -- the user must have generate these frames with the command "Connect" -- available through the contextual menu in 2D spectroscopy print " " print "==== List of User-Selected Cross Peaks ====" print ( title() ) -- the title of the spectrum for i = 1, 9999 do -- in practice, an endless loop local frame = clip( i ) -- get all kinds of annotations if not frame then print "----------------" return -- no more annotations end if frame.kind == "frame" then -- this is not text, picture or arrow local x = frame.x local y = frame.y if x == frame.yy and y == frame.xx then if x > y then --swaps x with y x, y = y, x end print( string.format( "%#10.3f %#10.3f", x, y ) ) end end end