AdamEA Posted July 8, 2023 Posted July 8, 2023 I use script recorder change the value 12 to 13 when using the script The value of 12 is not changed to 13. What should I change in the script?
kiynox Posted July 8, 2023 Posted July 8, 2023 [ @AdamEA ] --- Mind to explain why you put the same operation with different variable? revert = gg.getListItems() local t = gg.getListItems() --- I've seen that you're trying to flush the variable by making it "nil" local t = gg.getListItems() t = nil Well you can make temporary variable by making it like this: gg.removeListItems(gg.getListItems()) --- I also see the unnecessary "nil" argument added into gg.getResults() while you can just do this: gg.getResults(100000) --100K is too overkill. I suggest to narrow it down --- Make sure that your results is exist, prefered to get the number of result on each searches: --gg.searchNumber(blabla) print('Search: ', gg.getResultsCount()) --gg.refineAddress(blabla) print('Refine: ', gg.getResultsCount()) --- Also "v.flags" returns a number, so you should do this: if v.flags == 4 then blabla end -- "4" indicates DWORD (gg.TYPE_DWORD) ---
AdamEA Posted July 8, 2023 Author Posted July 8, 2023 gg.removeListItems(gg.getListItems()) Where should I replace it? Sorry, I just learned to use the script. ;,,; 2 hours ago, Xaviesz said: [ @AdamEA ] --- Mind to explain why you put the same operation with different variable? revert = gg.getListItems() local t = gg.getListItems() --- I've seen that you're trying to flush the variable by making it "nil" local t = gg.getListItems() t = nil Well you can make temporary variable by making it like this: gg.removeListItems(gg.getListItems()) --- I also see the unnecessary "nil" argument added into gg.getResults() while you can just do this: gg.getResults(100000) --100K is too overkill. I suggest to narrow it down --- Make sure that your results is exist, prefered to get the number of result on each searches: --gg.searchNumber(blabla) print('Search: ', gg.getResultsCount()) --gg.refineAddress(blabla) print('Refine: ', gg.getResultsCount()) --- Also "v.flags" returns a number, so you should do this: if v.flags == 4 then blabla end -- "4" indicates DWORD (gg.TYPE_DWORD) ---
kiynox Posted July 8, 2023 Posted July 8, 2023 [ @AdamEA ] --- I'm just trying to improve your script, but your main problem is at line 72, change it to: if v.flags == 4 then blabla end -- "4" indicates DWORD (gg.TYPE_DWORD) ---
AdamEA Posted July 8, 2023 Author Posted July 8, 2023 33 minutes ago, Xaviesz said: [ @AdamEA ] --- I'm just trying to improve your script, but your main problem is at line 72, change it to: if v.flags == 4 then blabla end -- "4" indicates DWORD (gg.TYPE_DWORD) --- The value has not changed. But I tried this offset script, it worked! gg.clearResults() gg.searchNumber("1288490188820;51539607852;214748364812::9" , gg.TYPE_QWORD) gg.refineAddress("C88", gg.TYPE_QWORD) p = gg.getResultCount() q = gg.getResults(p) for i = 1,p do local r = {} r[i] = {} r[i].address = q[i].address + 4 r[i].flags = 4 r[i].value = 13 gg.setValues(r) end gg.clearResults()
Question
AdamEA
I use script recorder change the value 12 to 13 when using the script The value of 12 is not changed to 13. What should I change in the script?
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.