• 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
Re: Compare two AppleScripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compare two AppleScripts


  • Subject: Re: Compare two AppleScripts
  • From: Christopher Nebel <email@hidden>
  • Date: Sun, 06 May 2018 22:31:41 -0700

> On Apr 27, 2018, at 5:34 PM, Stan Cleveland <email@hidden> wrote:
>
> On Apr 27, 2018, at 03:09 PM, Gil Dawson <email@hidden> wrote:
>
>> Has anyone worked out (or even on) a script to compare the source text for
>> two AppleScripts?
>
> Hi Gil,
>
> I've used Xcode's "FileMerge" app for years and love it. Here's a sample
> comparison of two simple scripts.
>
> <Screen Shot 2018-04-27 at 5.18.48 PM.png>
>
> The visual display of differences is quite useful and very thorough. You'll
> note that the right script is missing a line and that its last line has a
> changed variable name, from x to y, as compared to the left script.
>
> Note that this comparison only works if both scripts are saved as text files
> (with the .applescript extension). It also helps if they use the same line
> ending character, otherwise that will get flagged as a difference in every
> line.

FileMerge can compare compiled scripts too, given a little configuring.  In
FileMerge > Preferences > Filters, add an item for extension “scpt” with filter
“/usr/bin/osadcompile $(FILE)”, display Filtered.

—Chris N.
 _______________________________________________
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: Compare two AppleScripts
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Where do the errors go?
  • Next by Date: Re: Compare two AppleScripts
  • Previous by thread: Re: Editor performance (Jörgen Stahle)
  • Next by thread: Re: Compare two AppleScripts
  • Index(es):
    • Date
    • Thread