Addition to circular buffer macro: search and return
Posted: Sun Sep 06, 2020 11:35 pm
Me and the circular buffer will never be a good match. I don't know why but this never seem to work when I try things with it.
A great addition for me would be a "find and return" action that can be used in this macro.
This would search in the buffer for a certain string, and return the X'th value behind that search string.
If the buffer would contain:
%%%%%%%ABC9876543210%%%%%%... and so on.
and the search string would be "ABC" and the return value would be 4, this would in this buffer return "6".
So the 4th byte after the last part of the search string should be returned.
If there would be an option of keep the content of the buffer or erase it, this would be great to find response from devices and use them in a chart.
In a project I'm working on I could search for a certain pattern and return data that are always in a certain place after a certain string in a bunch of data.
A great addition for me would be a "find and return" action that can be used in this macro.
This would search in the buffer for a certain string, and return the X'th value behind that search string.
If the buffer would contain:
%%%%%%%ABC9876543210%%%%%%... and so on.
and the search string would be "ABC" and the return value would be 4, this would in this buffer return "6".
So the 4th byte after the last part of the search string should be returned.
If there would be an option of keep the content of the buffer or erase it, this would be great to find response from devices and use them in a chart.
In a project I'm working on I could search for a certain pattern and return data that are always in a certain place after a certain string in a bunch of data.