Create a new Reminder in Mountain Lion

Sharing and discussing custom actions for LaunchBar
Jayphen
Posts: 2
Joined: Fri Jul 27, 2012 4:55 pm

Create a new Reminder in Mountain Lion

Post by Jayphen » Fri Jul 27, 2012 4:58 pm

https://gist.github.com/3187630

Accepts reminders in the following format:

Code: Select all

Title of the note #description @29/7/12 16:00


The date must be roughly in the above format (no natural language input), and the time must be in 24-hr format.

sdaza
Posts: 5
Joined: Sat Jul 14, 2012 8:04 pm

Re: Create a new Reminder in Mountain Lion

Post by sdaza » Sat Jul 28, 2012 9:48 pm

It doesn't work in my laptop, it only opens the reminders app, but it doesn't add anything

Sebastian

Jayphen
Posts: 2
Joined: Fri Jul 27, 2012 4:55 pm

Re: Create a new Reminder in Mountain Lion

Post by Jayphen » Sun Jul 29, 2012 4:59 am

sdaza wrote:It doesn't work in my laptop, it only opens the reminders app, but it doesn't add anything

Sebastian


Did you add a list named 'Inbox' to Reminders?

Alternatively, in the code where it has

Code: Select all

set listName to list "Inbox"


Change "Inbox" to the name of one of your lists ("Reminders" is the default)

sdaza
Posts: 5
Joined: Sat Jul 14, 2012 8:04 pm

Re: Create a new Reminder in Mountain Lion

Post by sdaza » Sun Jul 29, 2012 5:20 pm

Thank you!

sabdal
Rank 1
Rank 1
Posts: 33
Joined: Wed Jun 18, 2008 4:49 pm

Re: Create a new Reminder in Mountain Lion

Post by sabdal » Fri Sep 07, 2012 9:40 pm

What will it take to get natural language back? Is that a function of Launchbar or of the Reminders app?

steward00
Posts: 1
Joined: Thu Sep 20, 2012 8:27 am

Re: Create a new Reminder in Mountain Lion

Post by steward00 » Thu Sep 20, 2012 8:28 am

We've just released a script for our app PushDialer that allows you to dial phone numbers with your iPhone (requires the PushDialer iPhone app and desktop app to be installed). It's based on the Skype script:







"steward"

jayhawkbabe
Posts: 4
Joined: Tue Sep 08, 2009 10:06 pm

Re: Create a new Reminder in Mountain Lion

Post by jayhawkbabe » Mon Oct 01, 2012 7:51 pm

Here is a version that will allow the name of the task list to be input as well. https://gist.github.com/3813222

Code: Select all

title of the reminder #some notes $reminder task list @29/07/2012 16:45


"Inbox" is the current default if no list name is entered, but this can be changed in the code on the following line:

Code: Select all

else
   set listName to "Inbox"
end if

jayhawkbabe
Posts: 4
Joined: Tue Sep 08, 2009 10:06 pm

Re: Create a new Reminder in Mountain Lion

Post by jayhawkbabe » Sat Oct 06, 2012 2:07 am

I've just updated the above link so it will handle relative dates ("Today" and "Tomorrow") in addition to days of the week. When days of the week are used, the next occurrence of that day will be selected. Thus, numerical dates must be used for anything further than one week in the future.

jayhawkbabe
Posts: 4
Joined: Tue Sep 08, 2009 10:06 pm

Re: Create a new Reminder in Mountain Lion

Post by jayhawkbabe » Sun Oct 07, 2012 5:35 pm

Another update of my script...

Updated to be compatible with Alfred and LaunchBar. Date is optional and can be entered as "Today", "Tomorrow", "Saturday", "Next Monday" or numerically with month/day/year where year is optional and can be two or four digit format. If no date is entered, "Today" is assumed. Relative dates are case insensitive and can be shortened, i.e. "mon". Time can be entered in 12- or 24-hour format and minutes and seconds are optional.

The default Reminders list is set after the comments.

Examples of valid reminders:

Code: Select all

Buy Milk #note about milk $Personal @10/7/2012 5:00:00 PM
Buy Milk #note about Milk @10/7/2012 5:00:00 PM
Buy Milk $Personal @10/7/2012 5:00:00 PM
Buy Milk @10/7/2012 5:00:00 PM
Buy Milk @10/7/12 5:00:00 PM
Buy Milk @10/7/12 5:00:00 pm
Buy Milk @10/7/12 5:00:00pm
Buy Milk @10/7/12 5:00pm
Buy Milk @10/7/12 5pm
Buy Milk @10/7 5pm
Buy Milk @Tomorrow 5pm
Buy Milk @tomorrow 5pm
Buy Milk @tom 5pm
Buy Milk @Sunday 5pm          this returns 10/14/2012 if today is Sunday, 10/7/2012
Buy Milk @sunday 5pm          this returns 10/14/2012 if today is Sunday, 10/7/2012
Buy Milk @sun 5pm              this returns 10/14/2012 if today is Sunday, 10/7/2012
Buy Milk @Next Sunday 5pm   this returns 10/21/2012 if today is Sunday, 10/7/2012
Buy Milk @next sun 5pm       this returns 10/21/2012 if today is Sunday, 10/7/2012
Buy Milk @today 17          this assumes time is in 24-hour format (i.e. 5pm)
Buy Milk @today 5          this also assumes time is in 24-hour format (i.e. 5am)
Buy Milk @5                  this also assumes time is in 24-hour format (i.e. 5am)
Buy Milk @5pm

sabdal
Rank 1
Rank 1
Posts: 33
Joined: Wed Jun 18, 2008 4:49 pm

Re: Create a new Reminder in Mountain Lion

Post by sabdal » Tue Oct 09, 2012 3:23 pm

I must be doing something wrong. I can't get it to do anything. Edited to save to the "reminders" list (which is what my list is called), Saved as scpt, put it in actions, then run the action, hit spacebar (in launch bar) and typed "buy milk @tomorrow and nothing showed up in reminders.

THanks!

sabdal
Rank 1
Rank 1
Posts: 33
Joined: Wed Jun 18, 2008 4:49 pm

Re: Create a new Reminder in Mountain Lion

Post by sabdal » Thu Jan 24, 2013 1:53 am

Got it working. My default reminder list was different than "Personal" so it never created anywhere. You can either change the default list in the script or create a list with that name. Either way. Nice script, thanks!

keitofu
Posts: 18
Joined: Tue Dec 01, 2009 10:03 am

Re: Create a new Reminder in Mountain Lion

Post by keitofu » Fri Jan 25, 2013 10:02 am

Thanks a lot for this script.
I'm trying to use it but have a problem,if I type :

buy milk @today 9

I should get a reminder at 9am. Instead I have a reminder for September 1st a 00h00 !

I have a french OS, could that mess up with the date format ?

If I try : > buy mil @9
Nothings happens, I don't have any reminder created

sabdal
Rank 1
Rank 1
Posts: 33
Joined: Wed Jun 18, 2008 4:49 pm

Re: Create a new Reminder in Mountain Lion

Post by sabdal » Fri Jan 25, 2013 1:42 pm

Try @today 9am

keitofu
Posts: 18
Joined: Tue Dec 01, 2009 10:03 am

Re: Create a new Reminder in Mountain Lion

Post by keitofu » Fri Jan 25, 2013 5:56 pm

Gives me the same result as : >buy milk@9
That is to say, no reminder created.

sabdal
Rank 1
Rank 1
Posts: 33
Joined: Wed Jun 18, 2008 4:49 pm

Re: Create a new Reminder in Mountain Lion

Post by sabdal » Fri Jan 25, 2013 9:33 pm

If you are typing exactly what you have written please write 9am. Not just 9.

Post Reply