Forums

Discuss all things Remember The Milk.

menu

Help with small milkscript question

salustri says:
I would like to write a milkscript that changes the tags on a task when the task is marked complete.

Are there any examples or documentation out there that might help me?

Note: I'm very green at javascript/milkscript.
Posted at 1:36pm on January 9, 2024
kjh says:
Hello @salustri,

Based on your description, it sounds like you want this to happen automatically as you complete tasks. Unfortunately, I don't think this is possible with MilkScript since these scripts need to be run manually & interactively by the user from within the RTM website.

OTOH, if you don't mind running a script manually from time to time, then you could probably have it look for all tasks that were completed (say in the past 30 days) and modify their tags.

The MilkScript docs are here: https://www.rememberthemilk.com/services/milkscript/

For another reference, I've also written a few report-type scripts and you can check them out on GitHub: https://github.com/kjhosein/rtm-milkscript-scripts/. These don't modify anything, but they do look for completed tasks.

HTH!

-- Khalid
Posted 14 weeks ago
salustri says:
Too bad.

It would have been nice if Milkscript recognized triggers like Google Appscript; e.g., when I edit a particular cell in Sheets, it will trigger a function execution.

Thanks for the fast response.
Posted 14 weeks ago
andrewski (Remember The Milk) says:
Hi salustri,
Thanks for your reply, Khalid! Very helpful. 💙

I wanted to add that you can trigger a MilkScript to run remotely via IFTTT or Zapier: our integrations have a "trigger " of tasks being completed, and you can then trigger a script to run.

This would run after every completed task, so you may want to adjust your script to suit.

I hope this helps all around! Keep us posted if you need any more help.
Posted 14 weeks ago
kjh says:
Thx Andrew - I had no idea!
Sorry salustri for the bad advice! ;-)

I decided to play around in IFTTT to create an applet that could do this, but I got stuck at the end where it's prompting for script parameters.

See for a screenshot: https://imgur.com/6KGsowc

Where do you plugin the name of the script?

I don't see any RTM docs on this.
Posted 14 weeks ago
andrewski (Remember The Milk) says:
Hi kjh,
It looks like you are in the "publish" screen there. The script name won't show up because this is "for everyone", since publishing makes an applet available to others.

If you go back and click on the applet, and then click "Settings" at the top right, you should see the edit screen where you can select your script. (And others can do the same once they use your published applet.)

I hope this helps! Let me know if you need anything further. 💙
Posted 14 weeks ago
This topic has now been closed automatically due to a lack of responses in the past 90 days.