Feature request: default item of a menu being selected

Discuss and share scripts and script files...
Post Reply
nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Feature request: default item of a menu being selected

Post by nas8e9 »

Since 8.40.0101 (with changes in 8.40.0102), XYplorer allows the visual display of a default item in a menu:

Code: Select all

        + Scripting: Changed yesterday's syntax for item states. No more
          prefixed "+" or "!". Now you define the states Default (Bold),
          Checked, and Disabled by combining binary values.
            Syntax:
              "Caption|Icon|State : Label" Script
            where
              State Default = 1
              State Checked = 2
              State Disabled = 4
          For example:
            "Go C:|C:|1" goto "C:\";  //shown bold
            "Go D:|D:|2" goto "D:\";  //shown checked
            "Go E:|E:|3" goto "E:\";  //shown bold and checked
After testing with 8.50.0036 beta, it seems that setting an item as default does not automatically select it in the menu thus enabling the user to use the arrow keys to navigate from the default item. This would be useful for Muroph's TeraCopy Integration script as it would emulate the keyboard control of the Copy/Move/Backup To-dialog.

By way of an example: the TeraCopy Integration script reads XYplorer's Copy/Move/Backtup To-list and populates the menu with these folders. By also reading the last used folder and setting its item as default (which it currently can't do), one can use the arrow key to select another, possibly close-by folder:

C:\Data\A
C:\Data\B
C:\Data\C (default: currently bolded but not selected)
C:\Data\D
C:\Data\E
...

By selecting the default item, in this case selecting D from C with the arrow keys would be faster and also more consistent with XYplorer's built-in dialog. Hopefully this could also be used in other scripts.

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

Re: Feature request: default item of a menu being selected

Post by admin »

I don't think that's possible. Have you ever seen a popup with a preselected item?

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Feature request: default item of a menu being selected

Post by nas8e9 »

admin wrote:I don't think that's possible. Have you ever seen a popup with a preselected item?
I thought I'd seen it in Word 2007, but now I can't find it any more: possibly the mouse cursor was already on the popup menu. No biggie, but in combination with the TeraCopy Integration-script it would have been nice to have. Thanks anyway.

Post Reply