Basic Functions - me2d13/luamacros GitHub Wiki
Assigning An Input Device
- Via Prompt
lmc_assign_keyboard('MACROS')
- Via Device ID
lmc_device_set_name('MACROS', '2BA672CB')
- Listing Devices
lmc_print_devices()
This can be used to obtain the Device ID. In the example output of\\?\HID#VID_046D&PID_C313&MI_00#9&378940FB&0&0000#{884B96C3-56EF-11D1-BC8C-00A0C91405DD} [89397213]
the ID is378940FB
.
Sending Keys
lmc_send_keys('Hello world')
Minimize application
To minimize luamacros application execute command
lmc_minimize()
There's also internal flag (variable) controling whether luamacros is minimized to taskbar (default) or to the tray. When following flag is set to true
lmc.minimizeToTray = true
then luamacros doesn't appear as application in taskbar (when minimized) but shows only tray icon.
Launching a program
lmc_spawn("calc")
lmc_spawn("notepad", "C:\\test.txt")
Executing a script from file
lmc_load('E:\\lmc.lua')
Change the window title
lmc_get_window_title()
Text-To-Speech
lmc_say('Hello, World!')
More information
- see sample scripts in src/samples
- see all available functions in src/uluaengine.pas
- how to use LuaMacros together with AutoHotKey: https://github.com/TaranVH/2nd-keyboard/tree/master/LUAMACROS