Passive selection via a script

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

: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: We 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.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Passive selection via a script

Post by ivan »

This could well be a feature and not a bug, but having thought about it I couldn't think of a reason why it would be a feature so here goes...

To reproduce:
1. Navigate to any folder with some files in it and make sure that the focus is on the folder (name of the folder is in a blue rectangle).
2. Assign a KS to this script:

Code: Select all

Selfilter *.EXT, f;
where "EXT" is an extension of any file(s) that you have in a folder you navigated to
3. Hit that KS

The selection of the file(s) with that extension will be made passively so it/they will be highlighted in grey boxes and the active focus will remain on the folder itself. This means that if you, for example, pressed the "Delete" button then it would apply to the folder and not the selected files.

The way my logic of how this should have worked is that if you apply a selection command then it's much better if those files are actively selected so you can apply additional commands as part of a script or so you can manually transfer them somewhere or do whatever you please. In other words, I don't understand why, when calling a selection command, the focus from the folder isn't transferred to the selected items automatically. After all, if you wish to select certain files then it could only be for the sole purpose of doing something with them.
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Passive selection via a script

Post by serendipity »

ivan wrote:...
The selection of the file(s) with that extension will be made passively so it/they will be highlighted in grey boxes and the active focus will remain on the folder itself. This means that if you, for example, pressed the "Delete" button then it would apply to the folder and not the selected files.
...
Not true, if you press delete on a focused but unselected item, then nothing will happen. To delete anything it has to be selected.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Passive selection via a script

Post by jacky »

serendipity wrote:
ivan wrote:...
The selection of the file(s) with that extension will be made passively so it/they will be highlighted in grey boxes and the active focus will remain on the folder itself. This means that if you, for example, pressed the "Delete" button then it would apply to the folder and not the selected files.
...
Not true, if you press delete on a focused but unselected item, then nothing will happen. To delete anything it has to be selected.
hmm, no. If you have one item (say a folder) focus and other(s) (say some files) selected and hit Delete, you'll delete the selected items of course.

Obviously though, that's only true if focus is on List. And it sounds to me, ivan, your focus must be on Tree, and thus hitting Delete means deleting the current folder. That's the normal/expected behavior of XY.

Try adding "focus l;" in your script and that should do it.
Proud XYplorer Fanatic

ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Re: Passive selection via a script

Post by ivan »

jacky wrote:Obviously though, that's only true if focus is on List. And it sounds to me, ivan, your focus must be on Tree, and thus hitting Delete means deleting the current folder. That's the normal/expected behavior of XY.

Try adding "focus l;" in your script and that should do it.
Thank you, adding that line to the script has shifted the focus from folder to list of files. Still, though, why it wouldn't happen intuitively escapes me.
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

Post Reply