Page 1 of 2

File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 07:21
by iwk941m45
Recently updated to XYplorer Pro 17.0 and the custom buttons on toolbar no longer open to the file location. Instead, an error message pops up saying the location cannot be found.

Here is a sample from a customized button to open in dual pane that no longer works:
goto "DUAL:1.C:\>>3||D:\>>2";

What's changed? How do I edit the button so that it opens to the correct location, instead of receiving an error message that location cannot be found.

Thanks

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 09:14
by Marco
DUAL feature was removed.

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 09:32
by highend
Never used "DUAL" (because I only use one pane) so I can't say for sure what the syntax you used did.

But opening two folders in active and inactive pane can be done like this:

Code: Select all

        focus "PI";
        goto "D:\";
        focus "PI";
        goto "C:\";
Btw, DUAL was removed in v16.90.0316:
- Dual Locations: Removed the DUAL feature that was experimentally added in
v12.50.0005 - 2013-06-19 14:21. It did not have the desired impact and
unnecessarily complicated the code in various places. It has been kind of
hidden and unofficial anyway since it was never added to the help file.
The app is now lighter and faster.

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 15:45
by iwk941m45
I have little experience with scripts.

How would I enter the syntax for a custom button?
I have this now on left:
goto "DUAL:1.Q:\>>3||X:\>>2";

I tried:
focus "PI";goto "D:\";focus "PI";goto "C:\";

But that only opened one pane to C:

what would the syntax be to open in dual pane, left pane C: right pane D:

Thanks

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 15:56
by LittleBiG
focus "P2";goto "D:\";focus "P1";goto "C:\";

Or here is an elegant way:
Create a new entry in Tools/List Management/Aliases menu:

Code: Select all

DUAL=focus "P2";goto "<@2>";focus "P1";goto "<@1>";
After this you can write into the address bar:

Code: Select all

@DUAL C:\, D:\
Or into your script:

Code: Select all

goto "@DUAL C:\, C:\Downloads";
Of course the 2 paths can be changed freely.

ADDITION: If you have comma in the folder name, use quotes like:

Code: Select all

goto "@DUAL ""C:\Documents\Urban, Keith music"", C:\Downloads";

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 17:13
by LittleBiG
I have extended with the view mode.

So the old way you used was: goto "DUAL:1.C:\>>3||D:\>>2";;

Add the new alias:

Code: Select all

DUAL=focus "P2";goto "<@3>";if (get("view") != <@4>) {load(eval("#" . (302 + <@4>)),,"s");};focus "P1";goto "<@1>";if (get("view") != <@2>) {load(eval("#" . (302 + <@2>)),,"s");};
and use this to achieve the same functionality:

Code: Select all

goto "@DUAL C:\, 3, D:\, 2";
:mrgreen:

Ps. Better not to write numbers higher than 7. I stop here I won't polish this alias longer.

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 17:38
by iwk941m45
Still not working.

Under Tools/List Management/Alias
I create:
DUAL=focus "P2";goto "<@3>";if (get("view") != <@4>) {load(eval("#" . (302 + <@4>)),,"s");};focus "P1";goto "<@1>";if (get("view") != <@2>) {load(eval("#" . (302 + <@2>)),,"s");};

Then on the custom button on toolbar, I select edit, then "on left":
goto "@DUAL C:\, 3, D:\, 2";

It didn't work, only opened to C:

What did I do wrong?

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 17:48
by highend
It's an alias, not a "normal" script.

It resolves to something like this:

Code: Select all

    focus "P2";
    goto "D:\";
    #304;
    focus "P1";
    goto "C:\";
    #305;
If D:\ should be in list mode and C:\ in small small icons mode

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 18:07
by admin
Cool, I remove a function and you re-add it via an alias! Shall we go on like this? ;)

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 21:14
by LittleBiG
iwk941m45 wrote:It didn't work, only opened to C:
What did I do wrong?
You did ok. It has to work. Probably you don't have the dual pane activated. This won't activate it for you.
admin wrote:Cool, I remove a function and you re-add it via an alias! Shall we go on like this? ;)
Suuuuuure. :biggrin:

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 22:05
by iwk941m45
Selected Dual Pane, then pressed button, the right pane went to D, but the left pane did not go to C:

What happened?

This is the alias:
DUAL=focus "P2";goto "<@3>";if (get("view") != <@4>) {load(eval("#" . (302 + <@4>)),,"s");};focus "P1";goto "<@1>";if (get("view") != <@2>) {load(eval("#" . (302 + <@2>)),,"s");};

This is on left on the button:
goto "@DUAL C:\, 3, D:\, 2";

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 22:53
by highend
Works here...

Add a step; command like this:

Code: Select all

DUAL=focus "P2";goto "<@3>";if (get("view") != <@4>) {load(eval("#" . (302 + <@4>)),,"s");};step; focus "P1";goto "<@1>";if (get("view") != <@2>) {load(eval("#" . (302 + <@2>)),,"s");};
When you invoke it with your button you'll get a "Stepping through a script" window once it reaches the focus "P1" command. Place it in the middle of your XY window, now create a screenshot and additional ones when you've clicked on continue. At least two times so it could execute the focus "P1" and goto "<@1>" commands...

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 23:45
by iwk941m45
OK, got it. It works now.

Finally, I have two buttons, each configured to open in dual pane to different locations. The first, C:, D:, the second, E:, F:

The E:, F: button does not open to its locations, instead giving an error that cannot find location. What additional configuration do I need to now open the second button to E:, F:

Re: File Location in Custom Button Is No Longer Found

Posted: 15 Jul 2016 23:51
by highend
And what was the reason that it didn't work before? oO
The E:, F: button does not open to its locations, instead giving an error that cannot find location.
Execute:

Code: Select all

text get("Drives");
from the address bar and post the result

Re: File Location in Custom Button Is No Longer Found

Posted: 16 Jul 2016 00:18
by iwk941m45
To understand how to properly configure this, and to keep it simple, I'm using root drives for our discussion. And, in this case, F is N

Here are the results: C:\|D:\|E:\|H\|N:\

Attached is screenshot of the error message when the second button is pressed, E: to N:

The first button didn't work before, I needed to choose dual pane BEFORE pressing the first button for C:, D: and when the message box displayed, I pressed continue twice, not knowing I needing to keep pressing it to advance through it.

This is my first time with scripting, alias, etc. Before the removal of dual, I only needed to press the button and the dual pane opened and to the proper location.