focus search box in inputselect

Discuss and share scripts and script files...
Post Reply
yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

focus search box in inputselect

Post by yusef88 »

recent loctions

Code: Select all

::#539;
recent files

Code: Select all

open inputselect("Recent Files", get("list_recentlyopenedfiles"), <crlf>, 5);
in first command, search box is focused and selected by default..can make same thing in the second?

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: focus search box in inputselect

Post by highend »

Em, just read the docs for inputselect()?

Hint: style
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: focus search box in inputselect

Post by klownboy »

Hi yusef88,
Try this is the address box. I had to use sendkeys before the command instead of after but it does work for me.

Code: Select all

::sendkeys "{tab}"; open inputselect("Recent Files", get("list_recentlyopenedfiles"), <crlf>, 5);
I just noticed highends's suggestion..using 69 instead of 5. That works w/o having to use sendkeys approach.
Ken

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: focus search box in inputselect

Post by TheQwerty »

Tip: For bit flags let XY do the math - your future self will thank you for saving them from the simple arithmetic.

This should work as you want:

Code: Select all

open inputselect("Recent Files", get("list_recentlyopenedfiles"), <crlf>, 1+4+32+64);
I added the 32 flag to auto-select the first item making it easy to open the most recent file using just Tab > Enter.

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: focus search box in inputselect

Post by yusef88 »

@klownboy @TheQwerty
really appreciate your help..thanks :D and this also works thanks for the hint,highend :wink:

Code: Select all

open inputselect("Recent Files", get("list_recentlyopenedfiles"), <crlf>, 97);

Post Reply