• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
script differences ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: script differences ?
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: can’t make current application into type string
  • Next by Date: Re: script differences ?
  • Previous by thread: Re: can’t make current application into type string
  • Next by thread: Re: script differences ?
  • Index(es):
    • Date
    • Thread