Thanks for the attempts, guys. I think Hooovahh's is the closest to what I need, I worked with it for a while but couldn't figure out what the issue was with it not working.
Oh, and I've decided that my cool idea would be better implemented as a right-click plugin, to make the user experience better. But we can continue the conversation here if anybody has a breakthrough.
I think I got it working...I've posted my attempt below (based on Hooovahh's attempt). Let me know if y'all see any problems with it.
Saved in LabVIEW 2015.
If someone is interested, I implemented a naive search algorithm both in LV and C, based on the paper from 1984. Be aware! I am very good in creating Rube Goldbergs!