script differences ?
script differences ?
- Subject: script differences ?
- From: Jean-Christophe Helary <email@hidden>
- Date: Sun, 11 Oct 2015 21:15:28 +0900
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 |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden