Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Delay [Resolved] #2

Closed
madgentos opened this issue Mar 12, 2018 · 7 comments
Closed

Delay [Resolved] #2

madgentos opened this issue Mar 12, 2018 · 7 comments

Comments

@madgentos
Copy link

madgentos commented Mar 12, 2018

Hello. Could you add a controlled delay for the trigger or action?
for reuse

@sychotixdev
Copy link
Owner

Controlled delay? Like... a new condition that will not return true until 5 seconds have passed for example?

@madgentos
Copy link
Author

Aha
What to put on offer at 80% of life, and then spam a lot :)
And many thanks for what you are doing!

@sychotixdev
Copy link
Owner

If you are trying to use it for a flask... there is a canUseFlask condition I believe. If you are just trying to have it use a hotkey, then you are right... a delay condition would be useful. It shouldn't be hard to implement.

@madgentos
Copy link
Author

yes for the key
little things but a lot of applications

@sychotixdev
Copy link
Owner

I don't think I will work on it tonight, but my current solution is probably going to be to add 1 condition and 1 action.

TimerCondition - Accepts a string and checks if a timer is completed or not with a configurable end time.
TimerAction - Accepts a string and begins/ends a timer.

With this solution, you would need to do something like this. Sound good?

Decorator(TimerCondition="Hotkey1Used")
{
Sequence
{
UseHotkeyAction,
TimerAction="Hotkey1Used", 5 seconds
}
}

@madgentos
Copy link
Author

good!
urgency is not required :)
Thank you!

@sychotixdev
Copy link
Owner

Added TimerAction and TimerCondition in commit bcaab6b

TimerAction starts or stops a timer. TimerCondition allows you a chance to perform actions based on how long the timer has been active. The example two comments up should work, but the "5 seconds" is configured on the condition, not the action.

Marking this issue as resolved unless issues are discovered.

@madgentos madgentos changed the title Delay Delay [Resolved ] Mar 13, 2018
@madgentos madgentos changed the title Delay [Resolved ] Delay [Resolved] Mar 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants