Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 04-17-2018, 07:29 AM   #1
jbraner
Human being with feelings
 
jbraner's Avatar
 
Join Date: Nov 2017
Location: Edinburgh
Posts: 488
Default Display a message in a custom action? (SOLVED)

Hi,

I haven't delved in to scripting yet - but is there an easy(ish) way to pass a text message to the screen, as part of a custom action?

I see an action for
"SWS/S&M: Open console with '/' to send a local OSC message" and this sends '/' to a little console.

Can I somehow "adapt" this to send out a custom message?
Or do I have to write a short script to insert in to my custom action?
(in which case could anyone be so kind as to show me how to do this?)
(a simple "hello world" is all I need)

I just want to give a little warning that the correct track is chosen - before the action runs.

====== boring details ========
PS - I'm creating a neat little 2 part custom action(s) to use with frozen tracks that have had FX added later. I like to freeze my guitar tracks with the amp/speaker sims. Then I add eq, compressor etc etc later. If I want to go back and unfreeze the track (to change something) - Reaper is very cool and won't lose the FX, but when I re-freeze the track - the additional FX will be "baked in".
So, my idea is to:
- make a dupe of my frozen track
- name it as a "temp" track
- del the FX from the original track and unfreeze it
then when it's edited and refrozen:
- copy the FX from the "temp" track
- paste them in to the original (newly frozen) one
- then delete the temp track

I just want to put in a warning - to be sure the correct track is chosen to run the second part from, as it uses "previous track" and "next track" ;-)

Last edited by jbraner; 04-17-2018 at 11:35 AM.
jbraner is offline   Reply With Quote
Old 04-17-2018, 08:21 AM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,964
Default

Action: Prompt to continue (only valid within custom actions)
cfillion is offline   Reply With Quote
Old 04-17-2018, 10:22 AM   #3
jbraner
Human being with feelings
 
jbraner's Avatar
 
Join Date: Nov 2017
Location: Edinburgh
Posts: 488
Default

Thanks, I saw that - but I want to type a custom message.

Isn't this just like a "pause"?
jbraner is offline   Reply With Quote
Old 04-17-2018, 10:39 AM   #4
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,964
Default

You'll have to write a script to have the ability to show a custom message (possibly even generated on the fly from the track names). The action above just asks whether to continue running the custom action or abort.
cfillion is offline   Reply With Quote
Old 04-17-2018, 11:37 AM   #5
jbraner
Human being with feelings
 
jbraner's Avatar
 
Join Date: Nov 2017
Location: Edinburgh
Posts: 488
Default

OK, I found it.
Just use reaper.ShowConsoleMsg("message") in a lua script.

So - testmessage.lua
Code:
reaper.ShowConsoleMsg("MAKE SURE TEMP TRACK IS SELECTED!\n\nAnd don't rearrange any tracks.")
I hope this is useful to someone...

There may be better ways to do this, but I've just made a separate script for each message, loaded them in to "actions", then run them in my custom actions ;-)

rgds,
jbraner is offline   Reply With Quote
Old 04-17-2018, 12:03 PM   #6
jbraner
Human being with feelings
 
jbraner's Avatar
 
Join Date: Nov 2017
Location: Edinburgh
Posts: 488
Default

UPDATE:

If there are multiple messages in the same custom action - they all use the same console screen - which doesn't close, if you don't click "close".

To clear the screen use
reaper.ClearConsole()

So, to make sure you clear an old message (rather than appending to the end), do it like this:

Code:
reaper.ClearConsole()
reaper.ShowConsoleMsg("This will delete the temp track.")
jbraner 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 01:42 AM.


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