Workaround input parameters

worldsheep

New member

In my macro I use the combination Wait Until Trigger + Time/Day Trigger. I want to know if anyone of you is aware of a workaround to let the user set the trigger time. The Time/Day Trigger block does not accept variables.

 

420

Active member
it's not exactly what you are looking for but you could set an integer variable to user prompt, you can then enter the time you want it to wait in minutes or hours in the prompt, and put an action after it to multiply that variable by 60 or 3600, and then a wait action that is set to wait for the variable amount of seconds... i can't really think of another way to do it right now..
 

worldsheep

New member
Thanks for your reply, it is definitely an option, but unfortunately is not what I need for my application. I need the event to fire at the exact time.

I could make a calculation by entering the time at which the trigger must fire and then read current time and extrapolate the wait time... But I think it will lack precision :(.
 

420

Active member
i found another way to do it, but it's a bit much... needs a every 1 minute trigger, so wastes "alot" of battery.. and it needs a plugin (UItask), and also needs a bunch of if clauses that check if the day/month/hour and minute variables are below 10, in which case a 0 needs to be added infront... :ROFLMAO:

it would be so much easier if we had the ability to set the time/day trigger to a variable..
 

Attachments

  • Screenshot_20210716-085401.png
    Screenshot_20210716-085401.png
    399.3 KB · Views: 9
  • Screenshot_20210716-085415.png
    Screenshot_20210716-085415.png
    148.7 KB · Views: 9

420

Active member
oh and you also will run into some problems if you want to have more then one "event" at a time, if that's case i gues you will need to create multiple event variables and check if the first one is empty, if it is not check if the second one is empty etc.. until it finds an empty one :ROFLMAO:
 

Dm114

Well-known member
I could make a calculation by entering the time at which the trigger must fire and then read current time and extrapolate the wait time... But I think it will lack precision :(.
You are right: calculate the wait time by subtracting the 2 times and you won't loose any second in precision as system times are in seconds.
 

420

Active member
You are right: calculate the wait time by subtracting the 2 times and you won't loose any second in precision as system times are in seconds.
it will be accurate, but this will only work if he wants the wait time to be 24 hours or less thouh (or 12 hours or less, if using 12 hour clock
 
Top