07-09-2017 10:59 PM
So I would like to implement an ability of my VI to open a text file and then using some kind of search function, locate and highlight a keyword that the user enters. Pretty much like when you hit Ctrl F in your internet browser and other places.
I've tried List Folder Function, but that only says whether a file you name is in a certain location. And I've tried Match Pattern but that only splices the file into before and after segments of where the keyword is.
Is there a better function to do this?
Solved! Go to Solution.
07-10-2017 01:31 AM
07-10-2017 01:34 AM - edited 07-10-2017 01:49 AM
You can use a while loop and a shift register to go through the text using the Match pattern function. If you find a match, you can go to next iteration and use a new offset value. You also need to check when you finished searching the string. This should be a simple task to program. Try to do it, and if you find problems to solve this, upload your VI here (not a screenshot!) so people can help you...
edit: something like this can help: