File Location in Custom Button Is No Longer Found

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
iwk941m45
Posts: 20
Joined: 30 Jan 2012 19:40

File Location in Custom Button Is No Longer Found

Post 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

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: File Location in Custom Button Is No Longer Found

Post by Marco »

DUAL feature was removed.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

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

Re: File Location in Custom Button Is No Longer Found

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

iwk941m45
Posts: 20
Joined: 30 Jan 2012 19:40

Re: File Location in Custom Button Is No Longer Found

Post 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

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: File Location in Custom Button Is No Longer Found

Post 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";

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: File Location in Custom Button Is No Longer Found

Post 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.

iwk941m45
Posts: 20
Joined: 30 Jan 2012 19:40

Re: File Location in Custom Button Is No Longer Found

Post 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?

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

Re: File Location in Custom Button Is No Longer Found

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

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: File Location in Custom Button Is No Longer Found

Post by admin »

Cool, I remove a function and you re-add it via an alias! Shall we go on like this? ;)

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: File Location in Custom Button Is No Longer Found

Post 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:

iwk941m45
Posts: 20
Joined: 30 Jan 2012 19:40

Re: File Location in Custom Button Is No Longer Found

Post 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";

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

Re: File Location in Custom Button Is No Longer Found

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

iwk941m45
Posts: 20
Joined: 30 Jan 2012 19:40

Re: File Location in Custom Button Is No Longer Found

Post 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:

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

Re: File Location in Custom Button Is No Longer Found

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

iwk941m45
Posts: 20
Joined: 30 Jan 2012 19:40

Re: File Location in Custom Button Is No Longer Found

Post 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.
To see the attached files, you need to log into the forum.

Post Reply