lowkPRO
Windows API + Lua = Powerful Automation
Full Windows API in Lua
- Use Windows C APIs with vanilla Lua 5.5
- Functions, structs/unions, callbacks, arrays
- Seamless C <—> Lua type conversions
Conveniences for common tasks
registerhotkey('ctrl alt d', myfn)sendkeys'lwin e'- And more!
File association for quick apps
Associates .lowk files with lowkPRO
so you can create Windows applications on the fly.
Just type some Lua code, save it, and you're done!
Purchase
| $24.99 per license: | Buy now |
| Enterprise customers: | Contact sales |
Documentation
The full power of the Windows C API
is available to the Lua script in any .lowk file.
All functions, constants, and types, and many macros, are available as globals.
- Create a
.lowkfile - Write Lua code
- Double-click it
Hello world
local b = MessageBox(
nil, "❤️?", "hi", MB_YESNO)
print(b, b == IDYES, b == IDNO)
os.execute('pause')

6 true false
Press any key to continue . . .
Lua to C primitive mapping
| Lua nil | <—> | C NULL |
| Lua bools | <—> | C BOOLs/BOOLEANs |
| Lua integers | <—> | C UINT64s |
| Lua numbers | <—> | C doubles |
| Lua strings | <—> | C char* |
| Lua userdata | <—> | C pointers |
Type constructors
Create structs, unions, and typedefs like so:
TYPE()
Returnssizeof(TYPE)memoryTYPE[n]
Returnssizeof(TYPE)*nmemory#TYPE
Returnssizeof(TYPE)
All memory is zeroed and garbage collectable.
CHAR[200] -- returns 200 bytes
BOOL[3] -- returns 12 bytes
WNDCLASS() -- returns 72 bytes
#WNDCLASS -- returns 72
Type accessors
Get or set fields on structs or unions like so:
mem[n]
Returnsmem[n]based on mem's TYPEmem.field
Returnsmem->fieldmem.field=val
Setsmem->field=valTYPE.get_[field](mem)
Returnsmem->[field]TYPE.set_[field](mem, val)
Setsmem->[field]=val
Callbacks
CALLBACKTYPE(luafn) -> void*
Returns C function pointer as userdata
local ptr =
WNDENUMPROC(function(hwnd, data)
print(hwnd)
return true
end)
print(ptr)
-- WNDENUMPROC: 000001AA1D100000
Additional globals
hInstance, hPrevInst, pCmdLine, nCmdShowpassed on from winmainhandleerror(e)global error handler if setprint(...)opens a new consoleprintf(...)just like in CL(str)creates wide-char userdatamemtostr(mem)makes lua zstring of memmemtostr(mem,sz)same but str with size
Unicode support
UTF-8 is enabled for ANSI functions. This works automatically with Lua strings.
When calling wide-char functions, use the L() helper to create unicode WCHAR* strings.
All ANSI functions with an A-suffix are aliased without it, so MessageBox==MessageBoxA.
Sample run loop
local msg = MSG()
while true do
Sleep(1)
GetMessage(msg, nil, 0, 0)
TranslateMessage(msg)
DispatchMessage(msg)
end
Changelog
1.0-rc1 (10/23/2025)
- All the features
- All the bugs
- Some of the TODOs
Name meaning
The name "lowkPRO" is an acronym, short for "Lua on Windows kernel for professionals."
Contact
For all inquiries, email contact@lowkpro.com