"Smart" front end for Beyond Compare

Sounds good, thank you! o)

Comparing both versions.. there's really not much left from aussie's release. o)


You have made some interesting modifications and improvements Leo. I had already planned to clean up the "path to BC" determination, recognising that most users will run the executable from the default installation location. Your code for interrogating the registry is not something I have ever come across before and looks to be a very useful snippet to keep. I also like your archive handling and use of BComp, if available, to open in tabs.

My logic for determining what to compare under various circumstances is driven by the way I typically use BC. Your logic is different but I have no doubt many others will prefer "Leo's way". I'll add a link at the top of the thread pointing to your code and description. I certainly plan to incorporate several of your improvements into "my" version and will likely post an update once done and tested.

Regards (and thanks), AB

Many thanks Leo !
:thumbsup:

=

@leo
Sorry, but one last thing..

Maybe you care to add 1 or 2 lines as to how to get this working as a button in the toolbar?
I had the previous one working (with $BC).
Deleted the button, wanted to delete the script (preferences), the last thing was not possible.
try reset, it now refers to a non-existing BC folder, again, I can't delete it,

Anyway, how to get this new .osp working under a toolbar button?

=

Look in the Customize dialog, Commands tab, under Script Commands. Just drag the command to your toolbar.

Or edit the button which runs $BC to run BeyondCompare instead.

You don't need to delete the script, the new one sbould overwrite it.

v2.3 AB (2014/05/02) is attached. Code now incorporates Leo's v2.2 LD improvements plus..

  • More flexible and rigorous handling of user supplied path/filespec (See note 1)
  • AB's added command is named $BC (vs Leo's BeyondCompare)
  • Uses AB's preferred logic for comparing selected files/folders.
    1. Compare files if exactly two files are selected in source.
    2. Compare folders if exactly two folders are selected in source.
    3. Compare relevant items if exactly one file or one folder is selected in each side of a DUAL.
    4. If none of the above and DUAL then compare sides (folders).
    5. If none of the above just open Beyond Compare main menu.

Note 1: If a path is supplied via the script configuration dialog it can be specified as a path - e.g. C:\Utilities\BC or a full filespec - e.g. C:\Utilities\BC\BCompare.exe and unintended leading/trailing spaces are ignored.

Regards, AB

Beyond Compare v2.3 AB.osp (8.56 KB)

Hi guys,

nice idea. But how do it get it working?
Neither version 2.2 from AB, nor the newest from Leo or AB are working.

Version 2.2:

  1. I copied the osp to Script Addins folder, went to configure it and changed the installation path to "C:\Program Files (x86)\Beyond Compare 3\BComp.exe" (with or without the quotes, doesn't matter)
  2. The command "$BC" showed up in the Command List and I added it a button
  3. Selected two files, hit the button and noting happens

New Version 2.3 post Leo

  1. No config possibility at all --> buttons are greyed out
  2. Nothing happens, if I click the button

Leos' version:

  1. No config possibility at all --> buttons are greyed out
  2. Command "Beyond Compare" does not even show up

Ony hints?

Regards
xbprm

Very strange. At the very least you should be able to configure. This is what I see when I navigate to and open the relevant config in scripts...


If you look in the "Other" log - Set UTILITY=OtherLog,On - do you see any error messages?

Regards, AB

This is what I see

v2.2

v2.2 LD

v2.3 post Leo

Nope.

Sorry, no I got one error. (Don't know why not the first time)

Beyond Compare 2.3 post Leo.vbs: Error at line 50, position 2
Beyond Compare 2.3 post Leo.vbs: Das Objekt unterstützt diese Eigenschaft oder Methode nicht.: 'initData.min_version' (0x800a01b6)

--> Tranlation: The object does not support member or method

Looks like you're DO version is just not uptodate (that missing property was introduced lately).

I had the same thought as soon as I saw the error. I am sitting behind a company firewall so I got no update messages. Will update manually and report back.

Ok, Dopus updated to 11.4.

Now, I can configure it properly but still nothing happens. I only get the following error

Error at line 1, position 1
$BC
^
Ungültiges Zeichen (0x800a0408) -> Translation: Invalid token
Parse error - script aborted

Button just runs "$BC"

Sounds like you created a "script-button".
You may try a "standard" button: "Standard Function (Opus or external)".

Heureka! Now, it works. Yes, it was a script button (legacy from the first implementation from AB).

Thanks all for the reply and the patience.

I was pretty happy (and surprised) when I tried to compare a file with an older version of that file that was stored in a zip and it worked. thanks AB :slight_smile:

Both Leo's and AB's version have this

initData.min_version = "1.3.1"

I believe it should be

initData.min_version = "11.3.1"

Oops. I've fixed that in mine now.

v2.4 AB (2014/06/12) is attached. Fixes the minimum version issue flagged (thanks) by wowbagger

Beyond Compare v2.4 AB.osp (8.63 KB)
Regards, AB

I really like this button but there are times I would like to use a different compare tool. To achieve this I have taken the great work you both (AB and Leo) have done, and generalised it so it can be applied to other compare tools.
I put it in a different post External compare tool buttons. It currently supports 15 different compare tools.