Yelay12 Posted July 18 Posted July 18 When i search as groupsearch,I get results is slower than normal search. Can i search as twice this two value and do offset with offset distance. if i know this two values and offset distance.How to write my script instead of group search. Please help with your great experience.
0 CmP Posted July 19 Posted July 19 What are the values? How many search results do you get when searching the values separately (i.e. new search for first value in desired ranges - X results, same for second value - Y results)? What is the offset between the values? Which option will work better for your case can be estimated only with knowledge of the details. 1
0 Yelay12 Posted July 19 Author Posted July 19 (edited) 5 hours ago, CmP said: What are the values? How many search results do you get when searching the values separately (i.e. new search for first value in desired ranges - X results, same for second value - Y results)? What is the offset between the values? Which option will work better for your case can be estimated only with knowledge of the details. My values are first is 210 and second is 30 TYPE_DOUBLE each. Offset distance between these values is 12 decimal number.X searching results for first will be approximately 500 and Y results for second get probably approximately 300 results.These results are not same one time to another time.Resultscount can be change every time. Please can you help me for this case. Edited July 19 by Yelay12
0 CmP Posted July 20 Posted July 20 Then it's reasonable to just search either first or second value and filter only desired results that have other value at needed offset. Something like the following: local firstValue = 210.0 local secondValue = 30.0 local offset = 12 gg.clearResults() gg.searchNumber(firstValue, gg.TYPE_DOUBLE) local firstValues = gg.getResults(gg.getResultsCount()) local secondValues = {} for i, v in ipairs(firstValues) do secondValues[i] = {address = v.address + offset, flags = gg.TYPE_DOUBLE} end secondValues = gg.getValues(secondValues) local targetResults = {} local index = 1 for i = 1, #firstValues do if secondValues[i].value == secondValue then targetResults[index] = firstValues[i] targetResults[index + 1] = secondValues[i] index = index + 2 end end gg.loadResults(targetResults) 1
0 Yelay12 Posted July 21 Author Posted July 21 21 hours ago, CmP said: Then it's reasonable to just search either first or second value and filter only desired results that have other value at needed offset. Something like the following: local firstValue = 210.0 local secondValue = 30.0 local offset = 12 gg.clearResults() gg.searchNumber(firstValue, gg.TYPE_DOUBLE) local firstValues = gg.getResults(gg.getResultsCount()) local secondValues = {} for i, v in ipairs(firstValues) do secondValues[i] = {address = v.address + offset, flags = gg.TYPE_DOUBLE} end secondValues = gg.getValues(secondValues) local targetResults = {} local index = 1 for i = 1, #firstValues do if secondValues[i].value == secondValue then targetResults[index] = firstValues[i] targetResults[index + 1] = secondValues[i] index = index + 2 end end gg.loadResults(targetResults) Thank you very very much.I'm finding that script.
Question
Yelay12
When i search as groupsearch,I get results is slower than normal search.
Can i search as twice this two value and do offset with offset distance.
if i know this two values and offset distance.How to write my script instead of group search. Please help with your great experience.
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now