CLua - Macro Tool
🧩 CLua – Introduction
CLua is a standalone Lua script runner, originally designed as a flexible and extensible macro tool to support modding for the game Original War. Its goal was to make modders’ lives easier — but it has since grown into a more universal tool.
It is now suitable for a wide range of automation and scripting tasks.
💾 Available Versions
CLua is provided as a console application for:
-
🪟 Windows Run directly via
CLua.exe
(The console opens automatically) -
🐧 Linux Run directly via
CLuabinary file or manually via console/terminal (To ensure the console opens automatically)
🔍 What CLua Can Do
CLua is written in C# and uses a custom embedded Lua engine to execute scripts. It is designed to support modular Lua code with features like:
- User interface elements (windows, buttons, text, progress bars…)
- Working with
.xlsxspreadsheets (no MS Excel required) - Text file generation
- Nested scripting via
import() - Modular architecture with support for custom code extensions
The GUI layer is powered by Terminal.GUI 2.4.4.
🔐 Security Restrictions
CLua is focused on safe macro scripting, and therefore:
- The following are fully disabled:
io,package,require,loadfile,dofile,loadstring,load,getmetatable,collectgarbage,setfenv,getenv,newproxy - Restricted to a safe subset:
os(onlyclock,date,difftime,time) anddebug(onlytraceback, also available as the globaldebugTracker) - Scripts are sandboxed — they cannot access files outside the CLua directory (All paths are relative to the CLua folder. Attempts to read files outside it will result in an error.)
This ensures that even community-provided scripts cannot perform unintended system operations.
🧪 Development Note
CLua is still in active development, but has reached its original goal. Further features will be added mainly upon request — it already allows you to build powerful, readable, and efficient macros.
📜 License
CLua is provided as an open tool for non-commercial use. The source code is available on GitHub.