local g = gg
local ls = {'test1','test2'}
local val = {"10;0;0;1::","20;0;0;2::"}
local c = g.multiChoice(ls,{false,false},'prova')
if c==nil then print('Canceled') os.exit() end
-- table to store search results
local results = {}
for i=1, #ls do
if c[i] then
s = val[i]
g.searchNumber(s,4)
-- ['getResults'] = function (maxCount, skip, addressMin, addressMax, valueMin, valueMax, type, fractional, pointer) end, -- gg.getResults(int maxCount [, int skip = 0 [, long addressMin = nil [, long addressMax = nil [, string valueMin = nil [, string valueMax = nil [, int type = nil [, string fractional = nil [, int pointer = nil]]]]]]]]) -> table || string with error
results[i] = g.getResults(999, nil, nil, nil, nil, nil, nil, nil, nil)
g.clearResults()
print(s)
print(results)
end
end
-- So the first results list is stored in the table
-- results in index 1 ( results[1] ).
-- the second search results list is also stored in the results table
-- but index 2
-- for editing you will use the code bellow
for k, v in ipairs (results[1]) do
v.value = '45' -- The value you want to change to
v.flags = gg.TYPE_DWORD -- value type
v.freeze = false -- true if you want to freeze
v.freezeType = gg.FREEZE_NORMAL -- remove both freeze and freeze type if you dont want to freeze the value
end
g.setValues(results[1])