New Guy, Needs Help

Announcements, questions
Post Reply
Posts: 1
Joined: 24 Mar 2019, 14:50

New Guy, Needs Help

Post by JohnnyBurns » 24 Mar 2019, 15:05

New guy to all of this LuaMacros.
I did use HIDMacros for a long time and loved it. But it won't work with my games now after they have updated, so I am having to learn something new.

Trying to make LUAMacro script where it recognizes the keyboard upon running the script, when I press the appropriate key it will not send the output of that key (ex: press Z I get "ZHello", instead of just "Hello" then enter key is pressed).

Getting this error message:
2019-03-24 09:47:57:561 [LUA] ERROR: Cannot load buffer. [string "LuaMacros script"]:12: <eof> expected near 'end'

Code: Select all

-- assign logical name to macro keyboard
lmc_device_set_name('KBD2', '65603');

  if (direction == 1) then return end  -- ignore down
  if (direction == 0) then return end  -- ignore up
  if     (button == string.byte('z')) then lmc_send_keys('bank')
  elseif (button == string.byte('x')) then lmc_send_keys('balance')
  elseif (button == string.byte('c')) then lmc_send_keys('.stats')
  else print('Not yet assigned: ' .. button) 

Post Reply