how to open multiple .lua with luamacro?
how to open multiple .lua with luamacro?
I have 3 keyboards, i plan the 2 is for macro, but i dont know how to open multiple .lua file with luamacro?
Re: how to open multiple .lua with luamacro?
Why do you need multiple files?
You can open just one, if it is too big, you can include other files.
You can open just one, if it is too big, you can include other files.
Petr Medek
LUAmacros author
LUAmacros author
Re: how to open multiple .lua with luamacro?
You have multiple handling functions and multiple lmc_set_handler calls.
See e.g. https://github.com/me2d13/luamacros/blo ... rc/lmc.lua
See e.g. https://github.com/me2d13/luamacros/blo ... rc/lmc.lua
Petr Medek
LUAmacros author
LUAmacros author
Re: how to open multiple .lua with luamacro?
please help me man, first please look at my code here: https://pastebin.com/GLnZeT0yadmin wrote: ↑06 Feb 2018, 09:26You have multiple handling functions and multiple lmc_set_handler calls.
See e.g. https://github.com/me2d13/luamacros/blo ... rc/lmc.lua
my problem is:
lua macro can define both keyboard, but why the Photoshop keyboard keep writing the 'key' in keypressed2.txt, which is the task of Premiere keyboard,so both my keyboard is writing in keypressed2.txt, what i really want is... the Photoshop keyboard writing the 'key' in keypressed.txt, and the Premiere keyboard writing the key in keypressed2.txt...
my question:
whats wrong with my code?
Re: how to open multiple .lua with luamacro?
You named both functions sendToAHK so 2nd one replace the first one
Petr Medek
LUAmacros author
LUAmacros author
Re: how to open multiple .lua with luamacro?
I am just beging with programming Lua MACRO
but it seems that you might be able to declare the function for the each keyboard. In this case i am intercepting obspad, but one might use a third and forth keyboard, and program it in the same .lua
but it seems that you might be able to declare the function for the each keyboard. In this case i am intercepting obspad, but one might use a third and forth keyboard, and program it in the same .lua
Code: Select all
lmc_device_set_name('keyboard','2670AE8')
[b]
lmc_device_set_name('obspad','FD00948')[/b]
lmc_print_devices()
[b]
lmc_set_handler('obspad', function(button,direction)
[/b]
if (direction == 1) then return end
......
......
-- zoom 4
elseif (button == 51) then
lmc_send_keys('+{F6}', 50)
lmc_send_keys('^{P}', 50)
end
end
)