Page 1 of 1

<drop> etc. - should I post a wish for quoted filenames or is there already?

Posted: 19 Sep 2018 23:42
by MBaas
Help! I don't "get it". :(

Tried to set up a catalog-item which would run beyond compare on dropped items.
I did this as:

Code: Select all

::run "%beyondc%"  "<get drop>"
It only opens the first file.

Alternatively (or additionally) - I wanted to enhance this command from a user button

Code: Select all

::run "%beyondc%"  "<get item a>" "<get item i>"
to check if there are two selected files in the active pane and if so, compare these - and if not, do as before. I tried to read the doc, but it just confuses me...

Re: <drop> etc. - should I post a wish for quoted filenames or is there already?

Posted: 20 Sep 2018 00:12
by highend
I don't get it as well. In the case that not two items are dropped, do "as before". What, opening only a single item, more than two?

Code: Select all

 $dropped = <get drop |>;
    if (gettoken($dropped, "count", "|") == 2) {
        $first = gettoken($dropped, 1, "|");
        $second = gettoken($dropped, 2, "|");
        run """%beyondc%"" ""$first"" ""$second""";
    }

Re: <drop> etc. - should I post a wish for quoted filenames or is there already?

Posted: 20 Sep 2018 01:32
by MBaas
Thank you! :appl: I will fiddle with that, looks great! Dropping > 2 files on that would be silly, so checking for exactly 2 files is the best thing to do. I'm the only user of that script and most often I know what I do, so I should be able to avoid dropping 3 ;-)