Here is a script that I wrote myself, probably after checking a few things on the web:
activate application "Reminders"
tell application "Reminders"
set reminder_contents to text returned of (display dialog "Reminder:" default answer "")
make new reminder with properties {name:reminder_contents}
end tell
And here is another one that I found on the web and that does pretty much the same thing:
tell application "System Events"
display dialog "Create a new reminder" default answer "" cancel button "Cancel" giving up after 20 with icon path to resource "Reminders.icns" in bundle (path to application "Reminders")
set reminTitle to text returned of result
tell application "Reminders"
set newremin to make new reminder
set name of newremin to reminTitle
end tell
end tell
I'd like to know what is technically different between the two approaches. Is the second one "better" ? If yes, why ? What is there to learn from the approach adopted in the second one ? Is there anything wrong with the first approach ?
Thank you in advance for your insights.
Jean-Christophe