Jump to content
Gzirry

Hello anyone can help in load results()

Recommended Posts

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

Share this post


Link to post
Share on other sites

If you need only edit results, use setValues.

Share this post


Link to post
Share on other sites

gg.setValues(r) maybe

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...