Page 1 of 1

Comparing scripts

Posted: Tue Aug 19, 2025 1:59 am
by jmk_phd
Hi all --
Some time ago I duplicated a button with a 1725-line script in order to test, catch, and correct any errors. Unfortunately, I did not keep good notes on the corrections made to the copy. After spending some time comparing the scripts line-by-line -- thanks to having learned from forum members that a script could be opened in a new window, so two scripts could be viewed side-by-side -- I recalled that the BBEdit app had a "Find Differences..." feature that required only saving each version of the script as a text file, then opening these in BBEdit. Within a few seconds I found 8 changes I'd overlooked in my first tedious line-by-line comparison, so it was very easy to reconcile the two versions of the script.

Perhaps I've missed that there is some comparison feature in LiveCode (at least prior to the new AI version that I don't need and can't afford) that does the same. Otherwise, I recommend using at least the free version of BBEdit in order compare and reconcile scripts.

jeff k

Re: Comparing scripts

Posted: Tue Aug 19, 2025 6:53 am
by SWEdeAndy
Check diffCompare in the Dictionary and see if that helps?

Re: Comparing scripts

Posted: Tue Aug 19, 2025 10:07 am
by bn
Hi,

I made a stack to compare versions of a script. It uses diffCompare and is not polished since it is mostly for private use.
It lists the diffences in gitHub style, clicking on a "difference" hilites the difference and scrolls them into view. You can paste the scripts into the fields or load two text files to make a diff.

Kind regards
Bernd

Re: Comparing scripts

Posted: Tue Aug 19, 2025 11:03 am
by richmond62
I have had a long-term love affair with BBEdit since about 2000; mind you that did involve their TextWranger for a bit.

Re: Comparing scripts

Posted: Tue Aug 19, 2025 11:09 am
by stam
Also a good reason to use version control systems like git/github.
Not only can you roll back any version, but using scriptonlystacks/text files, it will show a diff for each incremental version.