Page 1 of 2
Delays/Sleep between keystrokes not working?
Posted: 07 Apr 2016, 18:35
by fsm
I just started using this software, and it seems to be exactly what I need but I cannot get the following to work:
I need to hit the following sequence (from a browser): 0 tab tab tab space
The web app requires a delay between key presses, so I have written the following script to add a small delay in milliseconds between each key-press:
Code: Select all
HIDMacros.SendKeys "0"
sleep(200)
HIDMacros.SendKeys "1"
sleep(200)
HIDMacros.SendKeys "2"
sleep(200)
HIDMacros.SendKeys "3"
sleep(200)
I've based this on what I've been reading in these forums. What i see however is a small delay, then all keys sent at once, which does not work.
I read something about this on one of the site's pages, though it was referring to mouse clicks.
Any idea if this can work? I'm mapping to my numpad which does seem to work fine.
Re: Delays/Sleep between keystrokes not working?
Posted: 08 Apr 2016, 08:00
by admin
You may try something similar in LuaMacros. If there's a bug in the software I would fix it in LuaMacros, not in HidMacros.
No other idea, sorry.
Re: Delays/Sleep between keystrokes not working?
Posted: 08 Apr 2016, 18:12
by 17hmr243
since no one is willing to help here and the scrips are not in common mans language
i recommend you try
MacroGamer
its alot easier to use and make macros with delays between each keystroke
shame this program has very little to help new people start a macro
or even post some macros up to edit
Re: Delays/Sleep between keystrokes not working?
Posted: 11 Apr 2016, 17:19
by fsm
admin wrote:You may try something similar in LuaMacros. If there's a bug in the software I would fix it in LuaMacros, not in HidMacros.
No other idea, sorry.
Thanks for the quick reply. As far as I can tell it is a bug, unless there is some other way to get the delays to work. Will look into Lua Macros, but it seems I will have to do quite a bit of digging to figure out how to send a key.
Re: Delays/Sleep between keystrokes not working?
Posted: 11 Apr 2016, 17:22
by fsm
17hmr243 wrote:since no one is willing to help here and the scrips are not in common mans language
i recommend you try
MacroGamer
its alot easier to use and make macros with delays between each keystroke
shame this program has very little to help new people start a macro
or even post some macros up to edit
MacroGame is indeed very easy, but as far as I can tell it does not support having multiple keyboards which is my goal. I'd like to hook up an external numeric keyboard and use that for the macros. I have been up until now using autohotkey which works (at least with control/or windows-key combinations) but I would like to simply use a stand-alone numeric keypad.
LuaMacro (from my quick look) seems to be lacking in documentation, so I will have to spend more time with it. Searching as well for other alternatives.
Re: Delays/Sleep between keystrokes not working?
Posted: 26 May 2016, 18:44
by Skrelapwin
Hi everyone,
how do i code a delay in LuaMacro?
I've tried sleep(5000); , wait(5000); and delay(5000); nothing works.
Greetings,
Skrelapwin
Re: Delays/Sleep between keystrokes not working?
Posted: 27 May 2016, 08:05
by admin
Standard Lua doesn't have wait function and checking
additional functions in LuaMacros I haven't implemented delay yet.
I could but remember this would block your Lua execution thread so all macro handling would be delayed by this cal..
Re: Delays/Sleep between keystrokes not working?
Posted: 27 May 2016, 20:44
by Skrelapwin
This feature (sleep(milliseconds)) would be awesome, even if it blocks.
With this feature i could use luaMacro to automate obs multiplatform screen transitions in perfection
Re: Delays/Sleep between keystrokes not working?
Posted: 27 May 2016, 22:39
by admin
Give me a few days and feel free to remind yourself
Re: Delays/Sleep between keystrokes not working?
Posted: 19 Apr 2017, 22:54
by lulu
Hi Petr,
It's been a few days... would you consider implementing this delay option between keys ? it could help a lot ! thank you so much!