Macro for measuring distances

Hey API gurus out there. I frequently measure two different lines in a sketch and then divide one line length into the other to get a ratio. Would it be possible to make a macro that pops a window up that allows me to select two line and divide the length of one by the other and display the results? I am thinking that the macro would stay open until I clicked a close button indicating the macro to finish out. This would allow measuring multiple sets of lines.

Another idea would be to preselect two lines and have the ratio calculated and display the result in a window that "goes away when you click anywhere on the screen. I could assign the macro to a key stroke combination.

Are these possible? How?

SolidworksApi macros