My
Multi Click Button - Make any button multi-clickable blueprint needs a millisecond input for instance.
Clicking a button twice or more will usually require less than 1 second between clicks, otherwise it becomes a bit of a hassle.
Currently I’m using text input that gets split and then fed into the timeout function of the repeat loop (which ironically does support milliseconds).
Below is the code I’m using to solve the issue currently. It works fine, but it’s not a very elegant solution and it opens up user error possibilities.
Asking for the delay:
time_between_clicks:
name: Time between clicks
description: |
How much time can be allowed between any 2 clicks?
Please fill out the duration in the following format: HH:MM:SS:FFF
H = hours, M = minutes, S = seconds and F is milliseconds
default: []
selector:
text:
Splitting it up:
variables:
time_split: '{{ time_between_clicks.split(":") }}'
Feeding the split time to the loop:
action:
- repeat:
sequence:
- wait_for_trigger:
...
timeout:
hours: '{{ time_split[0] | int }}'
minutes: '{{ time_split[1] | int }}'
seconds: '{{ time_split[2] | int }}'
milliseconds: '{{ time_split[3] | int }}'