Retrieve focused folder from breadcrumb bar?
-
jupe
- Posts: 3570
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Retrieve focused folder from breadcrumb bar?
Since the new CEA middle click on folder now applies to the breadcrumb bar too when applied, can anyone think of a way of retrieving the focused/hovered folder?
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Retrieve focused folder from breadcrumb bar?
If Don doesn't add any awareness to XY for it (by enhancing
controlatpos() to return e.g. "BC 1|<hovered path> (<current path> if there is no hover)" or something like this, nope, not possible.One of my scripts helped you out? Please donate via Paypal
-
jupe
- Posts: 3570
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: Retrieve focused folder from breadcrumb bar?
Yeah that's the conclusion I came too as well, currently my feeling is that unless something like your suggestion gets added, it should maybe be considered to disable it for the breadcrumb bar, because it is a hindrance as it is currently.
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Retrieve focused folder from breadcrumb bar?
Next version there will be
<CEA_ClickedItem>.FAQ | XY News RSS | XY X
-
LittleBiG
- Posts: 1848
- Joined: 08 Apr 2011 12:57
- Location: Win10x64
Re: Retrieve focused folder from breadcrumb bar?
In my point of you, all variables which give back a folder name, should be ended with trailing slash. In this way, you could easily decide if you work with a folder or a file without extension.
What is the general rule now related to the trailing slash? (it came up when I changed my middle click script <curitem> to <CEA_ClickedItem> and it took a while to make it work again)
Edit: ah. <CEA_ClickedItem> on breadcrumb is trail-slashed, on a folder in the list it isn't.
What is the general rule now related to the trailing slash? (it came up when I changed my middle click script <curitem> to <CEA_ClickedItem> and it took a while to make it work again)
Edit: ah. <CEA_ClickedItem> on breadcrumb is trail-slashed, on a folder in the list it isn't.
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Retrieve focused folder from breadcrumb bar?
Next beta:
Code: Select all
* Custom Event Actions: <CEA_ClickedItem> now always returns the item
without trailing backslash, like all other XY native variables.
And, the value is reset (to "") after the script is finished.
FAQ | XY News RSS | XY X
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Retrieve focused folder from breadcrumb bar?
Imho it would be absolutely cool if
Either:
- Renamed to
and follows the rules of all other <...> variables so that by default all entries are separated by "|" but you can choose your own separator if necessary
via
and additionally really gives back all folders with a trailing backslash.
Or:
- Split into two variables
Where
Ofc with the same flexibility regarding the selection of your own separator like in "Either:"
This takes the burden off the script that is working with them to find out for each item if it is a file or a folder and assume you've clicked on 2k selected files...
<CEA_ClickedItem> would be:Either:
- Renamed to
<CEA_ClickedItems>and follows the rules of all other <...> variables so that by default all entries are separated by "|" but you can choose your own separator if necessary
via
<CEA_ClickedItems <crlf>>and additionally really gives back all folders with a trailing backslash.
Or:
- Split into two variables
<CEA_ClickedFiles> and <CEA_ClickedFolders>Where
<CEA_ClickedFolders> is returned without trailing backslashesOfc with the same flexibility regarding the selection of your own separator like in "Either:"
This takes the burden off the script that is working with them to find out for each item if it is a file or a folder and assume you've clicked on 2k selected files...
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Retrieve focused folder from breadcrumb bar?
Why plural? You can click only one item.
FAQ | XY News RSS | XY X
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Retrieve focused folder from breadcrumb bar?
You can click on selections (e.g. middle click or a <hold right mouse button for <x> milliseconds> -> Do not show the context menu but fire a cea)
This opens a plethora of possibilities for scripts to process items
This opens a plethora of possibilities for scripts to process items
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Retrieve focused folder from breadcrumb bar?
Okay, but can't you just retrieve the currently selected items by script?
FAQ | XY News RSS | XY X
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Retrieve focused folder from breadcrumb bar?
Sure but as I said, providing these items with trailing backslash (or even better: as two variables) the script can just iterate / process them in a more lightweight way because it doesn't need to use
exists() for each of them to find out if it's a file or a folder.One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Retrieve focused folder from breadcrumb bar?
Ok, makes sense. But the separator is not choosable because here the variable value is prepared "long" before the variable is seen and resolved. So it will be a hard "|".
FAQ | XY News RSS | XY X
-
LittleBiG
- Posts: 1848
- Joined: 08 Apr 2011 12:57
- Location: Win10x64
Re: Retrieve focused folder from breadcrumb bar?
Or it could be also good to grab the problem even at its root, generally: when I get the path of the selected items, should be an option to add the trailing slash automatically to the folders. And it could help in another cases, not only this.highend wrote: ↑15 Dec 2020 10:41 Sure but as I said, providing these items with trailing backslash (or even better: as two variables) the script can just iterate / process them in a more lightweight way because it doesn't need to useexists()for each of them to find out if it's a file or a folder.
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Retrieve focused folder from breadcrumb bar?
I can live with thatSo it will be a hard "|".
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 67270
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Retrieve focused folder from breadcrumb bar?
Well, this would destroy lots of scripts I guess. Or I would have to introduce new variables. Well, not now...LittleBiG wrote: ↑15 Dec 2020 11:13Or it could be also good to grab the problem even at its root, generally: when I get the path of the selected items, should be an option to add the trailing slash automatically to the folders. And it could help in another cases, not only this.highend wrote: ↑15 Dec 2020 10:41 Sure but as I said, providing these items with trailing backslash (or even better: as two variables) the script can just iterate / process them in a more lightweight way because it doesn't need to useexists()for each of them to find out if it's a file or a folder.
FAQ | XY News RSS | XY X
XYplorer Beta Club