|
|
|
02-25-2018, 10:21 AM
|
#1
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,571
|
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.
Last edited by EpicSounds; 12-20-2021 at 12:00 PM.
|
|
|
02-25-2018, 11:18 AM
|
#2
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,333
|
Nice one. It would be useful for other windows also.
+1
|
|
|
06-18-2018, 09:29 AM
|
#3
|
Human being with feelings
Join Date: Aug 2015
Posts: 23
|
+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.
|
|
|
06-20-2018, 07:37 AM
|
#4
|
Human being with feelings
Join Date: Jan 2011
Location: Tasmania, Australia
Posts: 37
|
+1 from me.
|
|
|
06-24-2018, 11:39 PM
|
#5
|
Human being with feelings
Join Date: Oct 2017
Location: China
Posts: 60
|
+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)
|
|
|
06-25-2018, 01:04 AM
|
#6
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
+1 I'm up for it
|
|
|
06-25-2018, 08:42 AM
|
#7
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,571
|
Quote:
Originally Posted by Moy
+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.
|
|
|
06-26-2018, 12:24 AM
|
#8
|
Human being with feelings
Join Date: Aug 2011
Posts: 517
|
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.
|
|
|
06-26-2018, 05:17 AM
|
#9
|
Human being with feelings
Join Date: Feb 2017
Posts: 4,813
|
+1 would be useful
|
|
|
07-01-2018, 02:22 AM
|
#10
|
Human being with feelings
Join Date: Dec 2017
Posts: 179
|
+1 from me too
|
|
|
07-02-2018, 07:53 AM
|
#11
|
Human being with feelings
Join Date: Sep 2017
Posts: 27
|
+1 from me too. This would greatly help users who use the media explorer frequently.
|
|
|
01-19-2019, 09:24 PM
|
#12
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
bumpy bump
|
|
|
01-19-2019, 11:53 PM
|
#13
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
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.
|
|
|
01-20-2019, 06:01 AM
|
#14
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
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)
Last edited by _Stevie_; 01-20-2019 at 08:28 AM.
|
|
|
01-20-2019, 08:30 AM
|
#15
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
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!
|
|
|
01-20-2019, 08:33 AM
|
#16
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by _Stevie_
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.
|
|
|
01-20-2019, 08:36 AM
|
#17
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Ahh good point! No issue for me personally, though, since I'm using Reaper in English.
|
|
|
01-20-2019, 11:11 AM
|
#18
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by _Stevie_
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.
|
|
|
01-20-2019, 11:56 AM
|
#19
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Awesome!
|
|
|
01-20-2019, 12:00 PM
|
#20
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,571
|
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.
|
|
|
01-20-2019, 02:07 PM
|
#21
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by EpicSounds
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?
|
|
|
01-20-2019, 02:10 PM
|
#22
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Have you tried it in conjunction with the custom action, I proposed?
|
|
|
01-20-2019, 06:11 PM
|
#23
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,571
|
Quote:
Originally Posted by Edgemeal
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_
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?
|
|
|
01-20-2019, 08:36 PM
|
#24
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by EpicSounds
It should work docked right?
|
Well it works when docked on Win7 here. Have you tried it non-docked to rule that out?
|
|
|
01-20-2019, 08:42 PM
|
#25
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,571
|
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
Last edited by EpicSounds; 01-20-2019 at 08:57 PM.
|
|
|
01-20-2019, 09:31 PM
|
#26
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by EpicSounds
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
|
|
|
01-20-2019, 09:33 PM
|
#27
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Quote:
Originally Posted by EpicSounds
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.
Last edited by _Stevie_; 01-20-2019 at 09:39 PM.
|
|
|
01-21-2019, 08:36 AM
|
#28
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by _Stevie_
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.
|
|
|
01-21-2019, 08:40 AM
|
#29
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
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.
|
|
|
01-21-2019, 10:13 AM
|
#30
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by EpicSounds
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.
|
|
|
01-23-2019, 11:40 PM
|
#31
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
@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?
|
|
|
01-24-2019, 07:26 AM
|
#32
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by _Stevie_
@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.
|
|
|
01-24-2019, 09:43 AM
|
#33
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Ahh, good to know, thanks man! I thought you were using some of the JS functions to retrieve the info
|
|
|
01-24-2019, 09:54 AM
|
#34
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
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.
Last edited by _Stevie_; 01-24-2019 at 11:13 AM.
|
|
|
01-27-2019, 05:21 AM
|
#35
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
@Edgemeal, another question:
can we actually alter the content of boxes? Like writing different values in there?
|
|
|
01-27-2019, 09:46 AM
|
#36
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by _Stevie_
@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.
|
|
|
01-27-2019, 10:19 AM
|
#37
|
Human being with feelings
Join Date: Jul 2009
Posts: 7,571
|
been away from this for a while. was there a way to select the first item in the list after searching?
|
|
|
01-27-2019, 10:21 AM
|
#38
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Thanks Edgemeal, will try that!
Quote:
Originally Posted by EpicSounds
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
|
|
|
01-29-2019, 09:32 PM
|
#39
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Quote:
Originally Posted by Edgemeal
Try JS_Window_SetTitle, should work on "Edit" type windows.
|
That worked, awesome!
|
|
|
01-30-2019, 09:00 PM
|
#40
|
Human being with feelings
Join Date: Oct 2017
Location: China
Posts: 60
|
Quote:
Originally Posted by Edgemeal
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
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:44 AM.
|