Page 1 of 1

[implemented] cm_OpenDriveByIndex with negative parameters

Posted: 2023-05-05, 22:19 UTC
by petermad
I would like to suggest negative parameters for the new TC 11.00 cm_OpenDriveByIndex command to count the drives from the end - so that cm_OpenDriveByIndex -1 would open the last drive.

Equivalent to negative parameters for cm_*ActivateTab*

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-05-06, 23:03 UTC
by Fla$her
Support++

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-06, 00:14 UTC
by petermad
Another approach could be if cm_OpenDriveByIndex went to the last drive if the index is higher than the last drive: for example cm_OpenDriveByIndex 99

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-06, 01:08 UTC
by Fla$her
2petermad
Why complicate it? This is a bad option. We not only need the last one, but also the penultimate one with -2, etc.

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-06, 01:15 UTC
by petermad
We not only need the last one, but also the penultimate one with -2, etc.
I agree, but if we can't have what I first suggested maybe we can have the other.

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-06, 01:23 UTC
by Fla$her
2petermad
My gut tells me that the first cannot be more difficult to implement than the second. ;)

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-06, 09:20 UTC
by ghisler(Author)
Using negative numbers is more logical (and would be the same as for cm_*ActivateTab*), so I will use that. Please note, however, that this will have different results whether the drive buttonbar is enabled or not (there are more items in the drive dropdown list).

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-06, 15:14 UTC
by Fla$her
2ghisler(Author)
And can you, in accordance with the command name, exclude cm_OpenNetwork from the list, leaving only drives?

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-06, 23:41 UTC
by petermad
Hope that USB-drives and the uX drives (cellphones) can be included even though they are volatile in the drive button bar / combobox

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-07, 08:12 UTC
by ghisler(Author)
Why not both? I will implement it like this:
Numbers below -100 count from the last button, so -101 would be the last button, -102 the second-last etc.
Numbers below 0 but above -100 count from the last drive letter

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-07, 15:10 UTC
by Fla$her
Trade-off decision. 👌
07.06.23 Added: cm_OpenDriveByIndex can now accept negative numbers below -100, where -101 would be the last button instead of the last drive (-1) (32/64)
But I also meant positive values. I.e. I don't want to call cm_OpenNetwork when the conditional Ctrl/Shift + 6/7/etc is accidentally pressed. How to deal with this?

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-07, 16:04 UTC
by petermad
history,txt wrote:07.06.23 Added: cm_OpenDriveByIndex can now accept negative numbers below -100, where -101 would be the last button instead of the last drive (-1) (32/64)
Confirmed implemented in TC 11.00b6 - but with several problems - see: https://ghisler.ch/board/viewtopic.php?t=79271

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-07, 16:04 UTC
by petermad
history,txt wrote:07.06.23 Added: cm_OpenDriveByIndex can now accept negative numbers below -100, where -101 would be the last button instead of the last drive (-1) (32/64)
Confirmed implemented in TC 11.00b6 - but with several problems - see: https://ghisler.ch/board/viewtopic.php?p=433863#p433863

Re: cm_OpenDriveByIndex with negative parameters

Posted: 2023-06-21, 16:16 UTC
by petermad
history.txt wrote:16.06.23 Added: cm_OpenDriveByIndex with positive values now only changes to drives, add 100 to also change to other folder types (32/64)
13.06.23 Fixed: cm_OpenDriveByIndex didn't work with some values when the hotkey contained Ctrl/Shift (32/64)
07.06.23 Fixed: cm_OpenDriveByIndex didn't work as described with negative numbers when drive buttonbars were enabled (32/64)
All of the above implemented or fixed in TC 11.00b8 :-)