GScript Overview
GScript is MacroForge's scripting language, based on JavaScript. Use it for logic that is hard to build with visual blocks.
GScript is optional. You can build complete macros with visual actions only.
What is GScript used for?
GScript is useful for:
- Perform complex math calculations on numbers you read from the screen.
- Use advanced text manipulation to clean up OCR results.
- Create dynamic loops, retries, or branching paths that would be too messy to build with visual blocks.
- Read and write to files, interact with APIs, or manage the clipboard.
- Writing an entire macro in code, if you prefer.
Where can you use GScript?
Add a Code action, or turn on Advanced Mode in an action that has it.