Jump to content

gg.saveALL??


Amoronix

Recommended Posts

Here is the function to add search results to the saved list

Parameters
        (optional) maxCount  Max count of saved results.

Returns
        True or string with error.

Code:

function saveAll(maxCount)
  local functionResult
  
  if type(maxCount) ~= 'number' then
    maxCount = 0xFFFFFFFF
  end
  
  if gg.getResultCount() == 0 then
    functionResult = 'Nothing found. No values to save.'
    return functionResult
  end
  
  local searchResults = gg.getResults(maxCount)
  if type(searchResults) == 'string' then
    functionResult = 'An error occured in function gg.getResults().' .. 'Info: ' .. searchResults
  else
    functionResult = gg.addListItems(searchResults)
  end
  
  return functionResult
end


Example of usage:

gg.searchNumber('123', gg.TYPE_DWORD)
saveAll()


Note: code of the function must be included before any call of the function in your script.

Link to comment
Share on other sites

  • 8 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.