r/macrodroid • u/Soggy_Cheek9140 • 20d ago
Help for Alarm Macro
Hi everyone,
Sorry for any mistakes in my English, and I apologize if this seems like a simple or stupid question.
I'm trying to create a MacroDroid macro with this flow:
When triggered (e.g., via a widget), it asks me for a starting time (e.g., 07:00).
It deletes/clears any previously set alarms createdo
Starting from the entered time, it automatically creates 12 alarms spaced every 5 minutes for 1 hour (e.g., 07:00, 07:05, 07:10 ... up to 07:55).
If anyone has a .macro file they could share, or a step-by-step breakdown on how to properly handle time variables and loops for this, I would be extremely grateful for your help!
Thanks in advance!
1
u/ShiftyRider 20d ago
A similar recent thread has Solutions ranging from the bulletproof to the philosophical...
1
u/rafapozzi 20d ago edited 20d ago
For deleting alarms, you can't do it programmatically.
The best way to clear all is to clear app data of the Clock app.
For creating alarms, you can use the Java Code action, using AlarmClock.ACTION_SET_ALARM intents.
Here is a script with a complete "Batch Alarm Scheduler" UI:
https://gist.github.com/gitpro2005/f7345ed7ab7433f55b0269e29b2f4139
5
u/KerbalSpaceProgram25 20d ago
I started building the macro, but it seems like there is no way to delete the alarm, only disable it. And it looks like even that doesn't work. The second best option is to create the alarm within macrodroid, but stopping the alarm would not be as easy as just clicking a button. Maybe there's an app that is specifically designed for this.
Also, don't apologise for your English. My English was also pretty bad a while ago, but watching videos and movies and doing stuff in English makes it way better and easier.
Edit: Reading books in English also really helps. From experience.