tell application "Reminders"
set newReminder to make new reminder
set name of newReminder to "Text"
set due date of newReminder to current date
end tell
How can I set the name of newReminder to input text?
applescriptautomatorremindersservices
tell application "Reminders"
set newReminder to make new reminder
set name of newReminder to "Text"
set due date of newReminder to current date
end tell
How can I set the name of newReminder to input text?
Best Answer
Here's an AppleScript code example:
This is coded so that you either have to enter a name for the reminder or cancel the prompt. In other words, if you don't type a name and click OK, you're prompted again and again until you do, or click Cancel.
Updated to address a point mentioned in comment:
The code below is used in an Automator service where the selected text passed to the Automator service becomes the name of the new reminder. It is coded not to create the reminder if an empty sting is passed. Although I don't think it can be triggered unless some text is selected, nonetheless it's always best to include some form of error checking.