Timeout voor OK

roccade

New member
I can make a timeout for canceling But i want a timeout for executies the next action, for ok.

Is this possible?
I want to use it when the power cable is disconnected. It must show the option cancel and ok(10). The only thing i can find is the option cancel(10) and ok, where the timeout is set on cancel en not on ok.
 

Attachments

  • Screenshot_20240225_234503_MacroDroid.jpg
    Screenshot_20240225_234503_MacroDroid.jpg
    301.7 KB · Views: 11

Dm114

Well-known member
I can make a timeout for canceling But i want a timeout for executies the next action, for ok.

Is this possible?
I want to use it when the power cable is disconnected. It must show the option cancel and ok(10). The only thing i can find is the option cancel(10) and ok, where the timeout is set on cancel en not on ok.
It's up to you set the right option at the right place: if you want the "negative" answer to be the default one, set it at the "positive" place.
 

roccade

New member
That seems easier said than done to me. I've tried everything but can't get it to work. Do you have experience with this or are your comments just a suggestion?

When negative answer is chosen it seems that the marco stops completely
 

Dm114

Well-known member
That seems easier said than done to me. I've tried everything but can't get it to work. Do you have experience with this or are your comments just a suggestion?

When negative answer is chosen it seems that the marco stops completely
Of course I used to use it.

The If Confirmed statement works this way:
- the 'positive' button executes the actions inside the If... and End if statements and then the actions outside (unless you cancel the macro)
- the 'negative' button (default after timeout) skips the actions between If... and Else if and excutes the actions outside.

Have a look to MD wiki:
 
Last edited:

roccade

New member
I tried that. If I test Marco manually and click cancel, it works. However, if I let timeout expire, the popup message remains with timeout at 0 and does not continue. any idea
 

Endercraft

Moderator (& bug finder :D)
I tried that. If I test Marco manually and click cancel, it works. However, if I let timeout expire, the popup message remains with timeout at 0 and does not continue. any idea
That's intentional. This triggers in case the if confirmed pops up when the screen is off.
 

roccade

New member
but after the timeout has expired, he still has to continue executing the marco? Or maybe I don't understand what you mean?
 

Endercraft

Moderator (& bug finder :D)
If the dialog popped up while the device was unlocked, then the timeout will close the dialog and select the chosen option as normal, but if the dialog popped up when the device was locked, then the timeout will reach 0 but won't do anything.
 

Dm114

Well-known member
If the dialog popped up while the device was unlocked, then the timeout will close the dialog and select the chosen option as normal, but if the dialog popped up when the device was locked, then the timeout will reach 0 but won't do anything.
Correct!
 

roccade

New member
This is the marco and the result;

I doing something wrong, but what?
 

Attachments

  • IMG_0825.jpeg
    IMG_0825.jpeg
    2.8 MB · Views: 12
  • IMG_0826.jpeg
    IMG_0826.jpeg
    3.2 MB · Views: 12

Endercraft

Moderator (& bug finder :D)
You need to add conditions to the NOT condition. The NOT inverts the result of its child condition(s).
 

Dm114

Well-known member
I want that after timeout popup “yes” will be displayed, and by canceling the popup “no”.
Could you explain in a few words what you want to achieve in this part of your macro?

It must be something quite simple...
 

roccade

New member
What I want to do is that once the power goes off the tab will turn off the tab with a 10sec delay so you can manually cancel the power off. So it must switch off automatically after timeout has expired.
 
Top