Page 1 of 1
[SOLVED] Selected Items Not Registered
Posted: 01 Apr 2013 10:44
by Enternal
Using selection rectangle to select multiple items does not always registered unless you directly click on at least one of the items. It's a very annoying issue. To reproduce:
1. Go into any folder
2. Go back
3. Using selection rectangle, multiple select some items (even one item is enough)
4. Run ::echo <curitem> in address bar
Nothing is selected even though visually the files are selected.
Re: Selected Items Not Registered
Posted: 01 Apr 2013 10:56
by highend
<curitem> uses the selected
and focused item. If you go one level up, the focused item is the folder you've stepped into, and if your mouse selection does not contain that folder, <curitem> will be empty^^
Take the steps again and at the end use:
and you'll see, that you get the expected output.
Re: Selected Items Not Registered
Posted: 01 Apr 2013 11:18
by Enternal
Ah I see the problem. For scripts, I have been using <curitem> the entire time. So it is working as expected. Thank you.
Re: [SOLVED] Selected Items Not Registered
Posted: 02 Apr 2013 09:42
by FluxTorpedoe
Indeed as
highend mentioned, the
selected vs
focused is a tricky trap.
It can be even worse: CTRL+Click on 2+ items, then CTRL+Click on one of them to deselect it. It gets deselected but stays focused! Logical... but dangerous depending on your scripts.
As a safety (when needed), I now tend to force the selected item(s) to be focused before proceeding:
Code: Select all
selectitems get("selecteditemsnames", "|"); // Ensure selected item(s) are focused
PS: That way you're sure to get your <cur...> working (<curitem>, <curext>...) as it should.