Jump to content

New function for GG API


CmP

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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.