Jump to content

LUA scripting


Enyby
 Share

Recommended Posts

  • 3 weeks later...
  • Administrators

Comet (SigmaScript) - a good editor for lua scripts for android, with syntax highlighting and the ability to insert ready-made patterns. You can use it when writing scripts for gg.
There is also an lua runtime, so you can test some parts of the code that do not have gg-specific functions.

https://play.google.com/store/apps/details?id=cc.sidi.SigmaScript

Link to comment
Share on other sites

  • 4 weeks later...
  • Administrators
An example of a simple script that searches for dword 1234567 and changes the first 100 results to 987654:
 
 
gg.clearResults ()
gg.searchNumber ('1234567', gg.TYPE_DWORD)
gg.getResults (100)
gg.editAll ('987654', gg.TYPE_DWORD)

It can be doubled if you need to replace something else. For example, if you still need to replace 1234 with 6789:
 
gg.clearResults ()
gg.searchNumber ('1234567', gg.TYPE_DWORD)
gg.getResults (100)
gg.editAll ('987654', gg.TYPE_DWORD)

gg.clearResults ()
gg.searchNumber ('1234', gg.TYPE_DWORD)
gg.getResults (100)
gg.editAll ('6789', gg.TYPE_DWORD)

Specific functions and their usage can be found in the online help: https://gameguardian.net/help/
Link to comment
Share on other sites

  • 1 month later...

@Enyby I want to enter six values to the field and use group search for them. The problem is values are hidden by the input window. I can use an eye button, but it I often miss it and press "Next" button on my keyboard which defocuses input field. I do this inputs often enough for it to be of nuisance to me...

Link to comment
Share on other sites

@Enyby Okey. I see.  Somewhy I don't see an internal keyboard for promt as text, only external. But it is even a good thing cause with internal keyboard whenever I miss eye button it supposes I finished my input and continues the script on...

Link to comment
Share on other sites

  • Administrators

If you need input more then allow internal keyboard then it switches to external.

internal keyboard is small and contains only subset of chars. You need full keyboard for input name. But for input number for search it is enough.

If you set type of field is text - then it be external keyboard. If - number - then internal kbd can be used.

_______________________________________________
added 1 minute later

For example you can see string search script. If you select type "text" - used external keyboard. For "hex" - internal.

_______________________________________________
added 2 minutes later

See param types:

https://gameguardian.net/help/classgg.html#afe6c5b86ba0ae295899fd259232aac2b

Run example.

Link to comment
Share on other sites

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.