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

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
MBaas
Posts: 582
Joined: 15 Feb 2016 21:08

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

Post 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...
______________________________________________
Happy user ;-)

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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

Post 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""";
    }
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 582
Joined: 15 Feb 2016 21:08

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

Post 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 ;-)
______________________________________________
Happy user ;-)

Post Reply