Lo primero que debemos hacer es localizar el id del teclado
Para localizar el id del teclado se puede lanzar el script locate_keyboard.lua Este script nos pide pulsar una tecla en el dispositivo que queremos usar para las macros y nos devuelve el ID de este dispositivo
Para comprobar si es un id valido podemos usar el script test_id.lua
Una vez tengamos el id localizado lo copiamos teniendo en cuenta las restricciones indicadas por locate_keyboard
El id que hemos obtenido previamente debemos asignarlo en el fichero de nuestro script.
keyboard_id = '1451C1FC'
lmc_device_set_name("MACROS", keyboard_id)Tambien es necesario asignar la ruta de los posibles scripts usados (ej. ficheros de constantes)(no substituir el '?' por nada, esto marca la ruta de la carpeta)
scripts_path = 'C:\\folder_path\\?.lua'Para lanzar el script es necesario lanzar la aplicacion LuaMacros.exe, cargar el script y darle a ejecutar
Otra opcion es programar su lanzamiento al inicio del sistema:
win + r
shell:startupEn la carpeta que se abre pegar un acceso directo a LuaMacros.exe Editar este acceso y en el campo destino añadir la direccion del script que queremos lanzar
C:\...\LuaMacros.exe -r C:\...\default-script.luaThe first thing we must do is locate the keyboard id
To locate the keyboard id you can launch the locate_keyboard.lua script This script asks us to press a key on the device we want to use for macros and returns the ID of this device
To check if it is a valid id we can use the script test_id.lua
Once we have the id located we copy it taking into account the restrictions indicated by locate_keyboard
The id that we have previously obtained must be assigned in the file of our script.
keyboard_id = '1451C1FC'
lmc_device_set_name ("MACROS", keyboard_id)It is also necessary to assign the path of the possible scripts used (eg constant files) (do not replace the '?' With anything, this marks the folder path)
scripts_path = 'C:\\folder_path\\?.lua'To launch the script it is necessary to launch the LuaMacros.exe application, load the script and give it to execute
Another option is to schedule its launch at system startup:
win + r
shell: startupIn the folder that opens paste a shortcut to LuaMacros.exe Edit this access and in the destination field add the address of the script that we want to launch
C:\...\ LuaMacros.exe -r C:\...\default-script.lua