View Single Post
Old 04-01-2019, 07:14 AM   #430
CSDProductions
Human being with feelings
 
Join Date: Mar 2019
Posts: 7
Default

Hey all,

Firstly - Lokasenna thanks for the creation of this. Very helpful!

I'm just getting into the world of Reascript, making a very basic window to aid some live playback.

I'm trying to use the return from GetPlayState() to determine the background colour of the window.
So...

Question 1 - Is it possible to change the colour of the main window?

Question 2 - If not, I'm really struggling to get a frame to change colour based on the return state. See the code below.

if reaper.GetPlayState() == 1 then
reaper.ShowConsoleMsg("PLAYING")
GUI.elms.stop_bg.color = "red"
end

Am I barking up the wrong tree? I know we're entering the if statement as the Console is displaying the message I'd expect. The other option is to have two frames and change their Z layer value but again, this also doesn't seem to work which makes me think I'm doing something fundamental wrong.

Thanks in advance!
CSDProductions is offline   Reply With Quote