i try to make some really complex shortcut like
lmc_send_keys("%( )^(,){BACKSPACE}+()sw chro{ENTER}")
but it won't work every time
so can lmc send keys had another argument :delaytime between every keypress,so it will reduce mistake and give the app to reacting time
Feature Request: delay between keys
Re: Feature Request: delay between keys
Could be done but such delays would block lua execution queue (this is separate thread).
I may put it on todo list but you need to remind me if you really need it
I may put it on todo list but you need to remind me if you really need it
Petr Medek
LUAmacros author
LUAmacros author
Re: Feature Request: delay between keys
I really need this, example: On Rocket League, I can not open the chat > write> and ENTER because LUA macro written too fast for the game :/admin wrote:Could be done but such delays would block lua execution queue (this is separate thread).
I may put it on todo list but you need to remind me if you really need it
Re: Feature Request: delay between keys
Petr Medek
LUAmacros author
LUAmacros author
Re: Feature Request: delay between keys
Thank you for adding the sleep function! Maybe I'm just not sure how to use it for my purpose, but is it possible to send a keyboard combo with delay between each keystroke like the OP was asking?
For example
Obviously that's not how you do it.. but is there a way to? Need slower key combos for OBS (Open Broadcaster Software) to pick up hotkeys coming from a second keyboard.
Basically would love the same functionality as
Excuse my noobishness.
For example
Code: Select all
lmc_send_keys('^ lmc_sleep(50) % lmc_sleep(50) {NUM3}')
Basically would love the same functionality as
Code: Select all
HIDMacros.SendKeysSlow "^%c", 50
Re: Feature Request: delay between keys
lmc_sleep is built in command - similar as lmc_send_keys. So you need to use it at the same level, not inside the string argument.
You have 2 options:
1) yesterday I merged & released pull request that's adding delay argument to lmc_send_keys function. So after downloading new version you can try something like
I didn't test it myself but that how the PR was written
2) use "lower level" function for key sequence with delays between, something like
See details here
You have 2 options:
1) yesterday I merged & released pull request that's adding delay argument to lmc_send_keys function. So after downloading new version you can try something like
Code: Select all
lmc_send_keys('^{NUM3}', 50)
2) use "lower level" function for key sequence with delays between, something like
Code: Select all
lmc_send_input(16, 0, 0) -- press shift
lmc_sleep(50)
lmc_send_input(65, 0, 0) -- press A
lmc_sleep(50)
lmc_send_input(65, 0, 2) -- release A
lmc_send_input(16, 0, 2) -- release shift
Petr Medek
LUAmacros author
LUAmacros author