Ardit19 Posted November 20 Share Posted November 20 gg.searchNumber("h 10 00 90 E5 1E FF 2F E1 1C 30 9F E5", gg.TYPE_BYTE, false, gg.SIGN_EQUAL, 0, -1) gg.refineNumber("16", gg.TYPE_BYTE) gg.searchPointer(0) results = gg.getResults(15) gg.addListItems(results) test = gg.getListItems() gg.clearResults() gg.clearList() Link to comment Share on other sites More sharing options...
1 MAARS Posted November 20 Share Posted November 20 (edited) gg.loadResult Edited November 20 by MAARS 1 Link to comment Share on other sites More sharing options...
1 MAARS Posted November 21 Share Posted November 21 19 minutes ago, MC874 said: Hi @Ardit19, to load the 3rd results, you can just do this: results = gg.getResults( gg.getResultsCount() ) gg.loadResults({results[2]}) Do note that LUA tables behave like an Array, it starts from 0. So 3rd results will be 2 (Location - 1). It start from 1 you mean ? 1 Link to comment Share on other sites More sharing options...
1 MAARS Posted November 21 Share Posted November 21 (edited) On 11/21/2023 at 2:43 PM, Ardit19 said: I found a way to do it from first value to go to 3rd without needing to save all results. You say that the code you attached will load first three results but I want to load only the third for example. If there is a way if not I will stick to the solution I found. The code @MC874 provided actually do what you described except that index is 3 since lua table index start at 1 instead of 0 Edited November 22 by MAARS 2 Link to comment Share on other sites More sharing options...
0 Ardit19 Posted November 21 Author Share Posted November 21 9 hours ago, MAARS said: gg.loadResult I want to save values to a table and since pointer values are same load result won't work because I have tried. I want for example to load 3rd value and then pointer search it again. Thanks for the reply! Link to comment Share on other sites More sharing options...
0 MC874 Posted November 21 Share Posted November 21 Hi @Ardit19, to load the 3rd results, you can just do this: results = gg.getResults( gg.getResultsCount() ) gg.loadResults({results[2]}) Do note that LUA tables behave like an Array, it starts from 0. So 3rd results will be 2 (Location - 1). 1 Link to comment Share on other sites More sharing options...
0 Ardit19 Posted November 21 Author Share Posted November 21 (edited) 4 hours ago, MAARS said: It start from 1 you mean ? I found a way to do it from first value to go to 3rd without needing to save all results. You say that the code you attached will load first three results but I want to load only the third for example. If there is a way if not I will stick to the solution I found. Edited November 21 by Ardit19 Link to comment Share on other sites More sharing options...
0 Ardit19 Posted November 21 Author Share Posted November 21 1 hour ago, MAARS said: The code @MC874 provided actually do what you described but only that the index is 3 since lua table index start at 1 instead of 0 Noted! 6 hours ago, MC874 said: Hi @Ardit19, to load the 3rd results, you can just do this: results = gg.getResults( gg.getResultsCount() ) gg.loadResults({results[2]}) Do note that LUA tables behave like an Array, it starts from 0. So 3rd results will be 2 (Location - 1). Thanks mate! Link to comment Share on other sites More sharing options...
0 MC874 Posted November 21 Share Posted November 21 Quote It start from 1 you mean ? Yeah, thank you for the correction. At first, I thought it's start from 0 like most language. Quote You say that the code you attached will load first three results but I want to load only the third for example No, it's only load the third result, not first three (1-3) results. Quote then pointer search it again Forgot to mention, you can also do pointer search for only the third result like this: --Save results to variable "results" results = gg.getResults( gg.getResultsCount() ) --Specifying number of pointers to find MAX_VALUE = 512 --Load specific (3rd) result gg.loadResults( { results[3] } ) --Search for a pointer with specified "MAX_VALUE" gg.searchPointer( MAX_VALUE ) Read the documentation here: gg.searchPointer() & gg.loadResults() Quote Thanks mate! Your welcome 1 Link to comment Share on other sites More sharing options...
0 CmP Posted November 21 Share Posted November 21 Option for loading third result directly with one operation: gg.getResults(1, 2) 1 Link to comment Share on other sites More sharing options...
Question
Ardit19
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now