Hi Guys,
im sorry for this basic question BUT since i'm not o coder please help me. I need a complete syntax with beginning and end that would turn let's say a button from my second extra NumPad to an F1 button.
something like
if (button == 107) then lmc_send_keys ('(F1)')
end if
yes but this of course does not work.
also i would like to use something like 3+7 on my numpad as Alt-Tab
thank you obiwan you're our last hope
Basic Syntax
Re: Basic Syntax
----------------------------------------------------
-- assign logical name to macro keyboard
lmc_assign_keyboard('MACROS');
-- define callback for whole device
lmc_set_handler('MACROS',function(button, direction)
if (direction == 1) then return end -- ignore down
----------------------------------------------------
if (button == 107) then -- Numpad 1
lmc_send_keys ("{F1}")
----------------------------------------------------
else print('Not yet assigned: ' .. button)
end
end)
----------------------------------------------------
(source: https://2ndkeyboard.webnode.nl/uitleg-luamacros/)
-- assign logical name to macro keyboard
lmc_assign_keyboard('MACROS');
-- define callback for whole device
lmc_set_handler('MACROS',function(button, direction)
if (direction == 1) then return end -- ignore down
----------------------------------------------------
if (button == 107) then -- Numpad 1
lmc_send_keys ("{F1}")
----------------------------------------------------
else print('Not yet assigned: ' .. button)
end
end)
----------------------------------------------------
(source: https://2ndkeyboard.webnode.nl/uitleg-luamacros/)
Re: Basic Syntax
For Alt-Tab you can just use 1 key.
if (button == 107) then -- Numpad 1
lmc_send_keys ("%&")
see also: https://github.com/me2d13/luamacros/wiki/List-of-Keys
if (button == 107) then -- Numpad 1
lmc_send_keys ("%&")
see also: https://github.com/me2d13/luamacros/wiki/List-of-Keys
Re: Basic Syntax
Thank you very much,I know this is still wrong but i really don't get it. I need a example with all the names i need to replace. Would you mind helping me over Skype? I need to set up my secondary numpad for my 3d aplication.
skype: Juxus1
skype: Juxus1
Re: Basic Syntax
I'm sorry, I think you need help from someone else (admin ?)
I'm working in a newer version of HID macros: Luamacros.
I thought it was working the same… but I think I was wrong.
I'm working in a newer version of HID macros: Luamacros.
I thought it was working the same… but I think I was wrong.
Re: Basic Syntax
The screenshot you have provided is from hidmacros with luamacros code (which will not work of course).
Scripting in hidmacros: http://hidmacros.eu/scripting.php
Scripting in luamacros: http://hidmacros.eu/forum/viewforum.php?f=12
But without scripting knowledge you can't use luamacros.
Scripting in hidmacros: http://hidmacros.eu/scripting.php
Scripting in luamacros: http://hidmacros.eu/forum/viewforum.php?f=12
But without scripting knowledge you can't use luamacros.
Petr Medek
LUAmacros author
LUAmacros author