Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 02-25-2018, 10:21 AM   #1
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,571
Default FR - Media Explorer shortcut: Search! [DONE]

I recently went through all the shortcuts in the Media Explorer and made several changes to improve my workflow (see video) but something I couldn't find was how to focus the search bar without clicking it with the mouse.

Other than pressing TAB 12 times there's no way to go from browsing files to searching again with the keyboard.

I suggest CMD/ctrl-F as default to focus the search bar.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog

Last edited by EpicSounds; 12-20-2021 at 12:00 PM.
EpicSounds is offline   Reply With Quote
Old 02-25-2018, 11:18 AM   #2
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Nice one. It would be useful for other windows also.
+1
vitalker is offline   Reply With Quote
Old 06-18-2018, 09:29 AM   #3
Osc~
Human being with feelings
 
Join Date: Aug 2015
Posts: 23
Default

+1, this would be nice to have.

Alternative to pressing tab 9 times, you can press shift+tab 3 times to go back to the search bar, then tab back 3 times to go to the results. I sometimes use this instead of the left click.
Osc~ is offline   Reply With Quote
Old 06-20-2018, 07:37 AM   #4
adcingeo
Human being with feelings
 
Join Date: Jan 2011
Location: Tasmania, Australia
Posts: 37
Default

+1 from me.
adcingeo is offline   Reply With Quote
Old 06-24-2018, 11:39 PM   #5
Moy
Human being with feelings
 
Moy's Avatar
 
Join Date: Oct 2017
Location: China
Posts: 60
Default

+1 Work for me.

And if user could assign a shortcut key for specific library/shortcut folder would be great (like Assigning shortcut key for specific fx)
Moy is offline   Reply With Quote
Old 06-25-2018, 01:04 AM   #6
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

+1 I'm up for it
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-25-2018, 08:42 AM   #7
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,571
Default

Quote:
Originally Posted by Moy View Post
+1 Work for me.

And if user could assign a shortcut key for specific library/shortcut folder would be great (like Assigning shortcut key for specific fx)
10 shortcuts for fav folders on alpha 1 to 0 would be great.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 06-26-2018, 12:24 AM   #8
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 517
Default

Needed. +1

EDIT: As a quick patch shift+tab twice gets you there on a pc

Now the question is: can you do a script that opens the media explorer and afterwards sends this couple key commands automatically? Then you just run the script each time you open media explorer

Last edited by reapero; 06-26-2018 at 12:53 AM.
reapero is offline   Reply With Quote
Old 06-26-2018, 05:17 AM   #9
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,813
Default

+1 would be useful
deeb is offline   Reply With Quote
Old 07-01-2018, 02:22 AM   #10
Nostrap
Human being with feelings
 
Join Date: Dec 2017
Posts: 179
Default

+1 from me too
Nostrap is offline   Reply With Quote
Old 07-02-2018, 07:53 AM   #11
schapps
Human being with feelings
 
Join Date: Sep 2017
Posts: 27
Default

+1 from me too. This would greatly help users who use the media explorer frequently.
schapps is offline   Reply With Quote
Old 01-19-2019, 09:24 PM   #12
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

bumpy bump
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-19-2019, 11:53 PM   #13
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

If you have js_ReaScriptAPI extension (v0.962+) try setting this Action to Control+F (or whatever),..

EDIT: See post #17 (Script updated).

Last edited by Edgemeal; 01-20-2019 at 11:14 AM.
Edgemeal is offline   Reply With Quote
Old 01-20-2019, 06:01 AM   #14
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Ahhhhh, Edgemeal, you're on a coding spree! Amazing!
Was going thru all the js functions yesterday, but I couldn't find anything

EDIT: hah, floppy post (1440)
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom

Last edited by _Stevie_; 01-20-2019 at 08:28 AM.
_Stevie_ is offline   Reply With Quote
Old 01-20-2019, 08:30 AM   #15
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

I just tried the script and it works perfectly! Thanks man

@everyone:

create a custom action with "Show/hide media explorer" followed by Edgemeal's script and you always get the search box, when fireing up the media explorer.
Workflow booster!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-20-2019, 08:33 AM   #16
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by _Stevie_ View Post
I just tried the script and it works perfectly! Thanks man
For non-English may need a tweak, and checking if visible,
Code:
local title = reaper.JS_Localize("Media Explorer", "common")
local explorer = reaper.JS_Window_Find(title, true)

if not explorer then --not-docked and closed
  reaper.Main_OnCommand(50124, 0) -- Media explorer: Show/hide media explorer
  explorer = reaper.JS_Window_Find(title, true)
end

local search = reaper.JS_Window_FindChildByID(explorer, 1015) 

if search then
  if not reaper.JS_Window_IsVisible(search) then -- when docked but not visible
    reaper.Main_OnCommand(50124, 0) -- Media explorer: Show/hide media explorer 
  end
  reaper.JS_Window_SetFocus(search)
end

Last edited by Edgemeal; 01-21-2019 at 08:35 AM.
Edgemeal is offline   Reply With Quote
Old 01-20-2019, 08:36 AM   #17
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Ahh good point! No issue for me personally, though, since I'm using Reaper in English.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-20-2019, 11:11 AM   #18
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by _Stevie_ View Post
Ahh good point! No issue for me personally, though, since I'm using Reaper in English.
I changed REAPER to the Deutsch language pack and the script with the Localize tweak worked.
Edgemeal is offline   Reply With Quote
Old 01-20-2019, 11:56 AM   #19
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Awesome!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-20-2019, 12:00 PM   #20
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,571
Default

its not doing anything for me

I have the JS_ReaScriptAPI Extension installed via ReaPack

loaded script to action list main
assigned keys
no response

same if loading to media explorer action list.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 01-20-2019, 02:07 PM   #21
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by EpicSounds View Post
its not doing anything for me

I have the JS_ReaScriptAPI Extension installed via ReaPack

loaded script to action list main
assigned keys
no response

same if loading to media explorer action list.
I have the script in Main, set to Control+F, if I press that hotkey while Media Explorer is open then the search textbox gets the focus and what I type goes there. (Tested on Win7).

Are you on a Mac? If its not working for you then I'll let Julian know, maybe there is a bug with his API on Mac?
Edgemeal is offline   Reply With Quote
Old 01-20-2019, 02:10 PM   #22
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Have you tried it in conjunction with the custom action, I proposed?
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-20-2019, 06:11 PM   #23
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,571
Default

Quote:
Originally Posted by Edgemeal View Post
Are you on a Mac? If its not working for you then I'll let Julian know, maybe there is a bug with his API on Mac?

I am on mac 10.12.
Quote:
Originally Posted by _Stevie_ View Post
Have you tried it in conjunction with the custom action, I proposed?
no because I would normally already have the window open, docked. It should work docked right?
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 01-20-2019, 08:36 PM   #24
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by EpicSounds View Post
It should work docked right?
Well it works when docked on Win7 here. Have you tried it non-docked to rule that out?
Edgemeal is offline   Reply With Quote
Old 01-20-2019, 08:42 PM   #25
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,571
Default

ok I just tried it not docked and it worked.

docked it again and it worked. what the heck yo \0-0/


OK this is really helpful when it is working. One big step closer to not needing the mouse in the media explorer.
Next I need to get the first of the search results selected
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog

Last edited by EpicSounds; 01-20-2019 at 08:57 PM.
EpicSounds is offline   Reply With Quote
Old 01-20-2019, 09:31 PM   #26
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by EpicSounds View Post
ok I just tried it not docked and it worked.

docked it again and it worked. what the heck yo \0-0/


OK this is really helpful when it is working. One big step closer to not needing the mouse in the media explorer.
Next I need to get the first of the search results selected
Not sure whats up with that docked/non-docked, weird for sure.

Get results from file list, try,..
Code:
function msg(str)
  reaper.ShowConsoleMsg(tostring(str) .. '\n')
end

-- get handle to media explorer
local title = reaper.JS_Localize("Media Explorer", "common")
local explorer = reaper.JS_Window_Find(title, true)
if explorer then
  -- get handle to 'File' Listview
  local container =  reaper.JS_Window_FindChildByID(explorer, 0)
  local lv = reaper.JS_Window_FindChildByID(container, 1000)
  -- get single item data from list
  local index = 0 --Index of file to get, 0 = first
  local column = 0 -- which column of data, 0 = first
  local fname = reaper.JS_ListView_GetItemText(lv, index, column)
  msg(fname)
end
Posted something similar over here,
https://forum.cockos.com/showpost.ph...&postcount=144
Edgemeal is offline   Reply With Quote
Old 01-20-2019, 09:33 PM   #27
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Quote:
Originally Posted by EpicSounds View Post
Next I need to get the first of the search results selected
My thoughts exactly, why is this window so counterintuitive...

1x Tab or Enter and cursor keys select entry, that's how it should be.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom

Last edited by _Stevie_; 01-20-2019 at 09:39 PM.
_Stevie_ is offline   Reply With Quote
Old 01-21-2019, 08:36 AM   #28
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by _Stevie_ View Post
1x Tab or Enter and cursor keys select entry, that's how it should be.
Oh I thought he just wanted to get names from the list, I don't think you can select listview items with JS's API, if it was a listbox I we could just send it messages to select items.

Updated code in #17 to show explorer if not open/visible.
Edgemeal is offline   Reply With Quote
Old 01-21-2019, 08:40 AM   #29
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Oh that wasn't geared towards your script. But rather the way that Media Explorer acts. You would expect that after doing a search, that TAB or ENTER would bring you to the item list. But instead it's cycling thru at least 10 other boxes or buttons.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-21-2019, 10:13 AM   #30
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by EpicSounds View Post
ok I just tried it not docked and it worked.
docked it again and it worked. what the heck yo \0-0/
I just noticed there is a new version (v0.963) of the extension, which says,..

* Find window functions: Fix bug for macOS.

So if not using v0.963 maybe update.
Edgemeal is offline   Reply With Quote
Old 01-23-2019, 11:40 PM   #31
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

@Edgemeal, how do you find the codes for the window elements (like the search box)?
Is there a function that enables you to iterate thru all of them?
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-24-2019, 07:26 AM   #32
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by _Stevie_ View Post
@Edgemeal, how do you find the codes for the window elements (like the search box)?
Is there a function that enables you to iterate thru all of them?
MS SPY++ (shown below) or similar utility that displays the Control ID,..



Some controls will be inside other controls, look up the tree to get the properties of their parent control, or what I called the container in the code above.

I made a simple Windows app for top-level windows too.

Last edited by Edgemeal; 01-24-2019 at 07:53 AM.
Edgemeal is offline   Reply With Quote
Old 01-24-2019, 09:43 AM   #33
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Ahh, good to know, thanks man! I thought you were using some of the JS functions to retrieve the info
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-24-2019, 09:54 AM   #34
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Ah love your little tool, brilliant and everything I need
Thanks!

EDIT: created a smilar script for the resources window. It's available via my repo.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom

Last edited by _Stevie_; 01-24-2019 at 11:13 AM.
_Stevie_ is offline   Reply With Quote
Old 01-27-2019, 05:21 AM   #35
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

@Edgemeal, another question:
can we actually alter the content of boxes? Like writing different values in there?
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-27-2019, 09:46 AM   #36
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by _Stevie_ View Post
@Edgemeal, another question:
can we actually alter the content of boxes? Like writing different values in there?
Try JS_Window_SetTitle, should work on "Edit" type windows.
Edgemeal is offline   Reply With Quote
Old 01-27-2019, 10:19 AM   #37
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,571
Default

been away from this for a while. was there a way to select the first item in the list after searching?
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 01-27-2019, 10:21 AM   #38
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Thanks Edgemeal, will try that!

Quote:
Originally Posted by EpicSounds View Post
been away from this for a while. was there a way to select the first item in the list after searching?
I wish, got the same problem with the resource window. Tab just doesn't jump to the first entry. It goes everywhere, but not to the list :P
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-29-2019, 09:32 PM   #39
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Quote:
Originally Posted by Edgemeal View Post
Try JS_Window_SetTitle, should work on "Edit" type windows.
That worked, awesome!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 01-30-2019, 09:00 PM   #40
Moy
Human being with feelings
 
Moy's Avatar
 
Join Date: Oct 2017
Location: China
Posts: 60
Default

Quote:
Originally Posted by Edgemeal View Post
For non-English may need a tweak, and checking if visible,
Code:
local title = reaper.JS_Localize("Media Explorer", "common")
local explorer = reaper.JS_Window_Find(title, true)

if not explorer then --not-docked and closed
  reaper.Main_OnCommand(50124, 0) -- Media explorer: Show/hide media explorer
  explorer = reaper.JS_Window_Find(title, true)
end

local search = reaper.JS_Window_FindChildByID(explorer, 1015) 

if search then
  if not reaper.JS_Window_IsVisible(search) then -- when docked but not visible
    reaper.Main_OnCommand(50124, 0) -- Media explorer: Show/hide media explorer 
  end
  reaper.JS_Window_SetFocus(search)
end
That's AMAZING, thank you Edgemeal !! <3
__________________
Nice to meet REAPER.
My Chinese tutorials of RAEPER: https://zhuanlan.zhihu.com/reaper
Moy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.