Old 08-02-2019, 08:45 AM   #1
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 517
Default Triggering actions only while naming track

In cubase, when typing the name of the track, I could hit ctrl + enter instead of just enter, and all the items on this track were named accordingly like the new typed name.

I think that concept could be expanded: we could not just target items, but regions,trigger scripts, etc. Sadly there is no section for "input track name" or something similar n the Actions window.

Would that be possible somehow in Reaper?
reapero is offline   Reply With Quote
Old 08-02-2019, 08:56 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

I don't think so, at least not without a great deal of hacking(finding the textfields, reading mouse-events to see, whether the names have been clicked upon, checking keyboard-typings, etc).

I think, this would better be fitting as a Feature-Request, as far as I can say for now.


Maybe someone else has a better idea...

Though you could write a script, that does the renaming. You just run it after you've changed the name...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-02-2019, 12:14 PM   #3
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Quote:
Originally Posted by mespotine View Post
Though you could write a script, that does the renaming. You just run it after you've changed the name...
At the moment this is all you can really do.

IMO Reaper is in dire need of event hooks for scripts/actions - imagine having an equivalent of the Mouse Modifier window but "On Transport Stop", "On Render Start", "On Render Complete".
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 08-02-2019, 01:59 PM   #4
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by mespotine View Post
Though you could write a script, that does the renaming. You just run it after you've changed the name...
I was just thinking how my script could detect if I was renaming a track, and came up with this. Of course to run the script the scope would need to be set to 'global+text'.

Code:
if reaper.GetCursorContext() == 0 then --  0 = track panels
  local hwnd = reaper.JS_Window_GetFocus()
  local id = reaper.JS_Window_AddressFromHandle(reaper.JS_Window_GetLongPtr(hwnd, "ID"))
  if id == 1000 then
    reaper.ShowConsoleMsg('User is renaming a track ' .. '\n')
 end
end
Edgemeal is offline   Reply With Quote
Old 08-02-2019, 02:42 PM   #5
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Reapero, I feel your pain, got so used to that as well.
What I did is this:

I assigned CTRL+Enter to "spk77_Rename items to track name.eel".

So what I do is:
- Change the track name, press enter
- directly after, I press CTRL+enter

that was the closest thing I could do here. But if Edgemeal comes up with something even better, I'm all ears!
__________________
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 08-02-2019, 09:26 PM   #6
Arthur McArthur
Human being with feelings
 
Arthur McArthur's Avatar
 
Join Date: Sep 2016
Location: Toronto
Posts: 744
Default

I've had the same issue so I made a custom action to select all midi items and rename them:

Custom: Rename all sampler tracks and MIDI items
SWS/BR: Select all MIDI items
Script: Mordi_Set selected items active takes name to track name.lua


I have to run it several times a session but it does everything at once.

Couldn't one make a script that shows MsgBox to rename tracks and then sets the item names after you hit enter?
Arthur McArthur is offline   Reply With Quote
Old 08-03-2019, 08:28 AM   #7
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 517
Default

Quote:
IMO Reaper is in dire need of event hooks for scripts/actions - imagine having an equivalent of the Mouse Modifier window but "On Transport Stop", "On Render Start", "On Render Complete".
Well..that would be really cool indeed. Cant even think of what awesome stuff users would come up with!

Quote:
So what I do is:
- Change the track name, press enter
- directly after, I press CTRL+enter
hehe..yeah, thought about that as well.

Quote:
Couldn't one make a script that shows MsgBox to rename tracks and then sets the item names after you hit enter?
Sure, but then you need more keycommands or buttons to launch the different scripts. Would be nice to have this sort of contextual detection in the background. I guess i am just thinking of a lot more different sections in the Action list.

Quote:
I was just thinking how my script could detect if I was renaming a track, and came up with this. Of course to run the script the scope would need to be set to 'global+text'
Not sure about "global+text" scope you refer to, but i assigned your script to F11 and it doesnt seem to be working here. Any step i am missing?
reapero is offline   Reply With Quote
Old 08-03-2019, 09:58 AM   #8
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

Quote:
Originally Posted by reapero View Post
Not sure about "global+text" scope you refer to, but i assigned your script to F11 and it doesnt seem to be working here. Any step i am missing?
REAPER v5.979+ (where you set shortcut key for Actions) there is new Scope option, if you want shortcut to work when your editing text then set its scope to 'global+text'.

What's New in REAPER v5.979 Update - global hotkeys
https://www.youtube.com/watch?v=ztqK...P&index=3&t=0s
Edgemeal 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 10:39 PM.


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