Page 1 of 1

Alphabetical shortcut

Posted: 07 May 2017 16:34
by raananb
It would be extremely useful if, along with the order selector (v and inverted v), the Name header label displayed a button allowing to select the first letter of a desired filename.

I have implemented this feature (Button 'A' in the image below) in my applications and it is a very efficient shortcut: when a letter is clicked, the first item starting with that letter is shown at the head of the display window. Imagine its usefulness in Windows/systme32 with it >4000 files.


Re: Alphabetical shortcut

Posted: 07 May 2017 19:50
by highend
Have you tried something like this?

Code: Select all

    $items = listpane(, , 1+4, <crlf>);
    $firstChar = popupmenu(formatlist(recase(regexmatches($items, "^."), "upper"), "cde"));
    if ($firstChar) {
        $firstItem = gettoken(regexmatches($items, "^$firstChar.*?(?=\r?\n)"), 1, "|");
        $oldClip = <clipboard>;
        copytext $firstItem;
        sendkeys "^v";
        wait 50;
        copytext $oldClip;

Re: Alphabetical shortcut

Posted: 07 May 2017 23:14
by raananb
With no experience with XY scripts, I tried to run the script but did not get anything useful.

I'd rather have a button...

Re: Alphabetical shortcut

Posted: 07 May 2017 23:17
by highend
It's meant to be invoked via a button ;)

Re: Alphabetical shortcut

Posted: 07 May 2017 23:56
by SkyFrontier
Errr... no matter how I write this, I have the feeling it WILL sound harsh. Not my intention here, so...

I don't get the benefit of having a button to be clicked, then to have a second entry to presumably be clicked just to... jump to the first item having that clicked letter.

Have you clicked the 'type ahead find' under Configuration, General, 'Menus, Mouse, Safety', raananb? (not to mention the awesome filter-as-you-type right in the file list... )

I ask this because I'm *ALWAYS* interested in what may bring usability gains, having written a good few scripts in that direction which helps me tons each and everyday so I have the minimum possible interface between my ideas and what the computers offers me, but... hum... am I missing something here? :roll:

Re: Alphabetical shortcut

Posted: 08 May 2017 07:36
by highend
Mouse users vs. keyboard users...

Re: Alphabetical shortcut

Posted: 09 May 2017 04:59
by SkyFrontier
'When you're a hammer, all you see are nails'.
Thanks, highend... :roll: