Delays/Sleep between keystrokes not working?

How can be this controlled in that simulator? Can HIDmacros be used with this application?
fsm
Posts: 3
Joined: 07 Apr 2016, 18:31

Delays/Sleep between keystrokes not working?

Post by fsm » 07 Apr 2016, 18:35

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.

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Delays/Sleep between keystrokes not working?

Post by admin » 08 Apr 2016, 08:00

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.
Petr Medek
LUAmacros author

17hmr243
Posts: 1
Joined: 08 Apr 2016, 16:52

Re: Delays/Sleep between keystrokes not working?

Post by 17hmr243 » 08 Apr 2016, 18:12

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

fsm
Posts: 3
Joined: 07 Apr 2016, 18:31

Re: Delays/Sleep between keystrokes not working?

Post by fsm » 11 Apr 2016, 17:19

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.

fsm
Posts: 3
Joined: 07 Apr 2016, 18:31

Re: Delays/Sleep between keystrokes not working?

Post by fsm » 11 Apr 2016, 17:22

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.

Skrelapwin
Posts: 2
Joined: 26 May 2016, 18:40

Re: Delays/Sleep between keystrokes not working?

Post by Skrelapwin » 26 May 2016, 18:44

Hi everyone,

how do i code a delay in LuaMacro?
I've tried sleep(5000); , wait(5000); and delay(5000); nothing works.

Greetings,
Skrelapwin

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Delays/Sleep between keystrokes not working?

Post by admin » 27 May 2016, 08:05

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..
Petr Medek
LUAmacros author

Skrelapwin
Posts: 2
Joined: 26 May 2016, 18:40

Re: Delays/Sleep between keystrokes not working?

Post by Skrelapwin » 27 May 2016, 20:44

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 :D

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Delays/Sleep between keystrokes not working?

Post by admin » 27 May 2016, 22:39

Give me a few days and feel free to remind yourself :-)
Petr Medek
LUAmacros author

lulu
Posts: 8
Joined: 30 Jun 2016, 21:18

Re: Delays/Sleep between keystrokes not working?

Post by lulu » 19 Apr 2017, 22:54

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!

Post Reply