Pluggy strings are one kind of strings, OBSE strings are a different kind.
I think what you need here is:
- Create a Pluggy string to hold the Filename >> let psFile := createstring -1 "MyFile.ini" 1 1
- Create a Pluggy string to hold the contents of the file >> let psAllPaths := createstring -1 0 1 1
- Create a Pluggy string to hold the path you are looking for >> let psMyPath := createstring -1 0 1 1
- Read the file to memory >> FileToString psFile psAllPaths
- To search the memory data >>
- - - Place your path into the pluggy string >> setString psMyPath $Path (assuming Path is an OBSE string)
- - - Check if your path is in the file contents >> If StringPos psMyPath psAllPaths > 0
Obs1- I am using "ps" as a prefix for the Pluggy string vars, which must be defined as Long in your script.
Obs2 - Don't forget to use Pluggy DestroyString function when done
Obs3 - Of course, you only have to read the file once if you are going to search it many times.
Obs4 - I suppose you could also convert the file contents into an OBSE string and use OBSE string functions to search it, but I don't know how to do it.