Jump to content

Archived

This topic is now archived and is closed to further replies.

CmP

New function for GG API

Recommended Posts

GameGuardian's API already has big amount of useful functions that can be used in scripts. I want to offer a new function/method to extend GG scripts possibilities.

It is not uncommon situation when user needs to perform an action with a few elements from the list (search results / saved list / memory editor). In this case, user selects desired elements and performs desired actions afterwards, doing all of these manually. This is usually fine, but sometimes user may need to perform some non-standard operations which involve elements selection (saving desired elements in specific format; performing some operations on selected elements; analyzing "behaviour" of desired elements keeping other ones in the list, etc). This is where automation with the use of scripts will come in handy.

First step for making this possible may be adding of the function(s) to get selected elements from search results, saved list, memory editor.

Possible prototype for such function may be:

mixed getSelectedElements ( int source )

where parameter "source" can be one of the following constants: GG_SEARCH _RESULTS; GG_SAVED_LIST; GG_MEMORY_EDITOR;
and returned value will be a table with selected elements or string with error (if one can occur).

Another option is 3 functions, each of which will be intended for getting selected elements from corresponding sources. This approach may help to avoid complexity with fields of a table that will be returned (fields will probably vary depending on the source).
Here are possible prototypes:

mixed getSelectedResults() -- for search results
mixed getSelectedListItems() -- for saved list
mixed getSelectedElements() -- for memory viewer/editor

Any of these options can provide the possibility to get selected elements from a script.
Choose elements to perform actions with, trigger required operations and that's it, other elements won't be "touched", they will remain in the list (if it's search results or saved list, because memory viewer is not a customizable list).

P. S. Some "trigger of action" when GG interface is active may be needed for comfortable work with this function(s). I think that some solution can be found, hence this should not be a big problem.

Share this post


Link to post
Share on other sites


  • Similar Content

    • By Blackn
      Hello GG Team,
      thank a lot for your great App, it helps a lot, and the Lua API is a very useful Feature to automate the daily tasks 🙂
      I have a feature request for the API as i don't see any chance to do it.
      I want to get get all files of the directory where the current script is.
      For example the script run in this directory:
      /storage/0/Notes
      and the script name is
      myscript.lua
      I want to get at the script myscript.lua all files which matches this pattern:
      myscript_PluginName1.lua
      myscript_PluginName2.lua
      myscript_PluginName3.lua
      Of course, PluginName can be every name, so there is no way to assume a specific Plugin file exists.
      I tried to list files of a directory though lua with os.execute and io.popen, but it's disabled due to security reasons.
      Is there a way to get file files a wrote above? If yes, how to do it? If no, can the feature implemented to GG ?
      Thank you in advance,
      Blackn
    • By hit_p
      I know im posting this in the wrong section but i cant post in Off-Topic.
      I have a suggestion for the app interface, dont know if this is possible or if it would consume too much ram or something else prevented this from already being added but i tought having this would be a nice addition.
      Search 1,buttons only affect searches from currently selected search tab.

       
      Search 2

       
      Other searches


       
       
       
    • By pensiunanhacker
      Sir Enyby ...
      permission to ask
      for example I look for the number 100 and then I save it in the list
      then from the list of numbers 100, I will filter it again or refine again using a new script code or a new function
      may sir enyby show an example of a script code for finding numbers from a list of numbers that have been collected
      in the initial function executed by the new function
      i mean not manual searching from list save but iwill use new function for searching again value from "thats range list value"
      thanks before
      go go go sir enyby ☕😘
       
    • By Un_Known
      Introducing Some themes would be a great idea!
    • By Un_Known
      While Telegram has become most popular platform for hacking modding related stuff but still wonder why there is not a well organised group related to GG where anybody could share their problems ask for some king of suggestions.
      But also at same time I think it should also not affects game guardian official site because i know that memebers would share apk, lua files directly in  it instead of uploading to gg site so to counter that no files should be allowed and no external links.
      Only link to GG official site should be allowed
      But it would be more oriented towards problems and their solutions 
      As it would led to more constructive talks on various issues without any restriction but only possible if pro and elite members along with contributors to gg community agree
      Thnx 
      share your views on this topic  only then any further action could be taken.
      if u don't support this idea. i have no hesitation in withdrawing it
       
×
×
  • Create New...