XkPP Posted January 21, 2023 Posted January 21, 2023 I found an important value of more than 5k results but this technique is slow to edit is there any other code that speeds up editing? ___ local edt = gg.getResults(gg.getResultCount()) for i,v in pairs(edt) do edt[i].address = edt[i].address + 8 edt[i].flags = gg.TYPE_FLOAT edt[i].value = 9999 edt[i].freeze = false gg.setValues(edt) end
XEKEX Posted January 23, 2023 Posted January 23, 2023 On 1/21/2023 at 4:55 AM, XkPP said: I found an important value of more than 5k results but this technique is slow to edit is there any other code that speeds up editing? ___ local edt = gg.getResults(gg.getResultCount()) for i,v in pairs(edt) do edt[i].address = edt[i].address + 8 edt[i].flags = gg.TYPE_FLOAT edt[i].value = 9999 edt[i].freeze = false gg.setValues(edt) end for i,v in ipairs(edt) do edt[i].address = edt[i].address + 8 end edt = gg.getValues(edt) -- this will refresh the addresses values (don't use in loop to make the script faster) gg.editAll('9999', gg.TYPE_FLOAT) ---------------------- --[[ In case you save the values in table and perform clear result u must use loadresult befor editall Note: Don't use set Values inside loop it make the script slower use it outside it does the perfect job and don't use parameter u don't need such as freeze because it's false by default ]]
XkPP Posted January 27, 2023 Author Posted January 27, 2023 On 1/23/2023 at 7:50 PM, XEKEX said: for i,v in ipairs(edt) do edt[i].address = edt[i].address + 8 end edt = gg.getValues(edt) -- this will refresh the addresses values (don't use in loop to make the script faster) gg.editAll('9999', gg.TYPE_FLOAT) ---------------------- --[[ In case you save the values in table and perform clear result u must use loadresult befor editall Note: Don't use set Values inside loop it make the script slower use it outside it does the perfect job and don't use parameter u don't need such as freeze because it's false by default ]] I understand, thanks
Question
XkPP
I found an important value of more than 5k results but this technique is slow to edit is there any other code that speeds up editing?
___
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.