Jump to content
  • 0

Hello anyone can help in load results()


Gzirry

Question

anyone know how to loadResults

I want to load search results into a function

at the beginning of the script

example

 

 

gg.searchNumber('3', gg.TYPE_DOUBLE)

gg.getResults(1000)

local R=gg.getResults()

gg.clearResults()

 

Function Main()

menu=gg.choice({'item 1','item2','item3'})

if menu == 1 then item1() end

if menu == 2 then item2() end

if menu == 3 then os.exit() end

end

function item1()

gg.loadResults(R)        ← not working

gg.getResults(1000)

gg.editAll('10', gg.TYPE_DOUBLE)

gg.toast('item 1 activated')

gg.clearResults()

end

 

function item2()

gg.loadResults(R)

gg.getResults(1000)    ← not working

gg.editAll('20',gg.TYPE_DOUBLE)

gg.clearResults()

gg.toast('item2 activated')

end

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

You need add results to list before load it

Example:

gg.searchNumber("1", gg.TYPE_DWORD)
local add = gg.getResults(10)
-- Save Results
gg.addListItems(add)
gg.clearResults()

-- Loading Results
list = gg.getListItems(add)
for i, v in ipairs(list) do
add[i].value = "2"
end
gg.setValues(add)

*CMIIW

Link to comment
Share on other sites

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.