Forums

Discuss all things Remember The Milk.

Uses for MilkScript

davidletts says:
Hi, I was wondering if anyone had created anything useful using the new MilkScript functionality, or had ideas of what it could be used for beyond the 3 examples provided. It seems like it has the potential to be powerful and useful, although I can't think of any practical uses for it at the moment!
Posted at 8:06am on May 20, 2022
raymond.bergmark Power Poster says:
I tried it for the old problem shopping lists, should work fine for that.
Below is just an example, results in subtasks within subtasks.

# Shopping list (template)
* Shopping list
** Dairy
*** Butter
*** Cheese
*** Milk
** Frozen
*** Ice cream
*** Spinach
** Fruits
*** Apples
*** Oranges
** Vegetables
*** Salad
*** Tomatoes
Posted 1 year ago
davidletts says:
Thanks, I can see how it might be useful in cases like that
Posted 1 year ago
jonathan.pilborough says:
A cool thing about it is that you aren't limited to working with internal RTM data, you can call out to external services provided they don't require a big javascript library to access.

I set up a rudimentary integration with the time tracking Toggl. When I tag a task with 'toggl', this is picked up by IFTTT, which then triggers a MilkScript script which calls the Toggl API to start a new time entry with the task name and tags(hopefully this round trip will not always be needed).
Posted 1 year ago
evanhahn says:
RTM has no good way to find tasks with invalid start dates; that is, a task where the start date is after the due date. For example, a task due tomorrow with a start date of next week. The app puts a warning icon in the UI when you do this, but does nothing else to prevent it.

I wrote a MilkScript that finds all incomplete tasks with invalid start dates, and if there are any, creates a task to clean them up. For example, it might create a task called “Fix 5 tasks with invalid start dates”, due today.

Code here: https://evanhahn.com/remember-the-milk-script-to-find-tasks-with-invalid-start-times/
Posted 1 year ago
organisator says:
I love scripts.

This I use at the end of the day to postpone all the tasks of today, I have not finished:

const tasks = rtm.getTasks('due:today');
tasks.forEach(task => task.postpone());

console.log('Postoned %d task(s).', tasks.length);


Also, I start it at 2345 with IFTTT.
Posted 1 year ago
jamesr404 says:
@Raymond duh, I never thought of using subtasks with groceries - but the benefit is so obvious. So euh, thanks for sharing that!

@David thanks for the great topic idea :)
Posted 1 year ago
darrenw says:
I create work tasks with a articular set of tags and personal tasks with a separate set of tags. I've created 'New work task' and 'New poersonal task' scripts which create a task with the relevant tags and importance level so all I have to do is change the name of the task.

One thing I'm stuck on (I'm not a programmer so have been feeling my way thorugh this blind!) is how to set the start date of the task as today (I use the start date to keep track of how long tasks have been on my list) and to put the task in a particular list rather than appearing in the standard inbox. Any suggestions welcome!
Posted 1 year ago
darrenw says:
Have worked out how to set the start date to today:

// task.setStartDate(new Date())

I've also worked out how to use input parameters to specify which list a task should be added to. However, I have yet to work out how to hard code the specific list I want all tasks created by the script to be created in.
Posted 1 year ago
Log in to post a reply.