Re: Compare two AppleScripts
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