If you mean how to do it without concatenating tables with results from separate searches for each value (and potentially significantly faster), it may be done by searching multiple values at once with range searches. The idea is to make initial search from lowest target value to highest, then N - 1 refine searches to exclude ranges of values that are between target values, so that only target values remain at the end. Below is an example implementation of this idea for your case (untested, may require minor changes if doesn't work as is).
local function interpretAsInteger(double)
return string.unpack("I8", string.pack("d", double))
end
local function interpretAsDouble(integer)
return string.unpack("d", string.pack("I8", integer))
end
local function convertToString(double)
return string.format("%.17g", double)
end
local function getNextDoubleStr(doubleValue)
local intValue = interpretAsInteger(doubleValue)
local nextDouble = interpretAsDouble(intValue + 1)
return convertToString(nextDouble)
end
local function getPreviousDoubleStr(doubleValue)
local intValue = interpretAsInteger(doubleValue)
local previousDouble = interpretAsDouble(intValue - 1)
return convertToString(previousDouble)
end
local function searchMultipleDoubleValues(values)
if #values < 2 then
return
end
table.sort(values)
local initialSearchStr = convertToString(values[1]) .. "~" .. convertToString(values[#values])
gg.clearResults()
gg.searchNumber(initialSearchStr, gg.TYPE_DOUBLE)
for i = 1, #values - 1 do
local excludedRangeLowerBound = getNextDoubleStr(values[i])
local excludedRangeUpperBound = getPreviousDoubleStr(values[i + 1])
local excludedRangeSearchStr = excludedRangeLowerBound .. "~" .. excludedRangeUpperBound
gg.refineNumber(excludedRangeSearchStr, gg.TYPE_DOUBLE, false, gg.SIGN_NOT_EQUAL)
end
end
local valuesToSearch = {}
for value = 7, 700, 7 do
valuesToSearch[#valuesToSearch + 1] = value
end
searchMultipleDoubleValues(valuesToSearch)
local resultsCount = gg.getResultsCount()
print("Found " .. resultsCount .. " results")