Search found 585 matches

by admin
28 Jan 2019, 11:11
Forum: General
Topic: Keeping button pressed
Replies: 4
Views: 121

Re: Keeping button pressed

I think your scripts are correct. If you hold down the key at keyboard the repeating hold down action is done by keyboard driver (as you can configure the interval in keyboard settings). However the lmc_send_input is sending single event. So if you need the repetition it can't be done in luamacros u...
by admin
28 Jan 2019, 10:59
Forum: General
Topic: detecting "Double-click" vs "single click" from numpad
Replies: 4
Views: 108

Re: detecting "Double-click" vs "single click" from numpad

Timer would be resource consuming. Better remember timestamp of the key press, store it to some global variable and on every 0 key press compare current timestamp with the last one stored. Get the difference and decide. Lua probably has something built in to get current miliseconds (or from system s...
by admin
25 Jan 2019, 10:09
Forum: HowTos
Topic: Cross-locale reprograming of second kb into a hotkeys kb
Replies: 2
Views: 216

Re: Cross-locale reprograming of second kb into a hotkeys kb

Nice one.
You could read the file on script start and keep the definition in memory to not re-open file on every key press. But then you would need to re-run script to reflect changes in file.
by admin
21 Jan 2019, 09:35
Forum: Feature requests
Topic: Request: holding key down
Replies: 3
Views: 4125

Re: Request: holding key down

This is now possible in luamacros, using lmc_send_input you can send only key press or key release.
But for luamacros you need to deal with lua scripting.
by admin
18 Jan 2019, 09:25
Forum: HOW-TOs and documentation
Topic: Keystrokes allowed to pass through
Replies: 2
Views: 2269

Re: Keystrokes allowed to pass through

I need to pin this statement somewhere as I wrote it many times already here :-). Luamacors (and Hidmacros) use kind of hack to block original key as Windows OS is not designed to separate different keyboards. This hack works in 90% situations but some (other) application are written in way that the...
by admin
15 Jan 2019, 08:42
Forum: General
Topic: I need your help about LuaMacros script starting with windows
Replies: 8
Views: 1032

Re: I need your help about LuaMacros script starting with windows

You should put there shortcut to luamacos.exe with script name as parameter in target of such shortcut. This is not different for luamacros like running any other programm with parameter (file name)
by admin
14 Jan 2019, 09:02
Forum: General
Topic: I need your help about LuaMacros script starting with windows
Replies: 8
Views: 1032

Re: I need your help about LuaMacros script starting with windows

Do you put there shortcut to luamacros.exe with "Start in folder" with correct directory, where luamacros is installed?
by admin
07 Jan 2019, 10:02
Forum: General
Topic: I need your help about LuaMacros script starting with windows
Replies: 8
Views: 1032

Re: I need your help about LuaMacros script starting with windows

What is not recognized? Do you have problems to start luamacros.exe or luamacros is started but lua script is not loaded into it?
by admin
25 Dec 2018, 22:40
Forum: General
Topic: Mechanical Push Button in Xplane Cockpit mapping
Replies: 2
Views: 293

Re: Mechanical Push Button in Xplane Cockpit mapping

Solution 1) remember the "state" in some lua variable and based on this send the oposit
Solution 2) instead of remebering the value in lua var, read the dataref first on every (appropriate) key press and send the other value
by admin
18 Dec 2018, 09:22
Forum: General
Topic: lmc_get_button
Replies: 1
Views: 287

Re: lmc_get_button

ad 1) this should work, just make sure you define isF2 in global scope (not inside f2 handler only). I'm using such 'global' variables in my scripts, you can check lmc.lua in source repo
ad 2) as the message says - lmc_get_button is only for game devices (joystick) buttons, not for keyboards