Code: Select all
tv_BackGround
parse result Bkgnd
IF CMP(Bkgnd,"check 128 128 128 200 200 200") = = 1
tv_BackGround "color" 200 200 200
ELSE
tv_BackGround "check" 128 128 128 200 200 200
END
Here's a quick solution I use all the time: ToggleBackgroundButtons.tvpx. The first button has a GEORGE script that toggles between White, 3 shades of Gray and Black background, plus a light Gray checked background. The second button has an embedded script (as listed above) in which you can change the individual RGB settings yourself.
Sven
[edited Jan 17 2018]
And here is the other, longer script which can also be edited (just remember to follow the logic on RGB values that are changed and make sure they are the same in the IF test that follows). Click Select All and EMBED in place of the above script and you'll have White, three shades of gray and black plus the check background.
Code: Select all
Param none
ScriptName = "ToggleBackgrounds"
tv_BackGround
parse result Bkgnd
IF CMP(Bkgnd,"check 128 128 128 200 200 200")
tv_BackGround "color" 255 255 255 // white background
EXIT
END
IF CMP(Bkgnd,"color 255 255 255")
tv_BackGround "color" 200 200 200 // light gray background
EXIT
END
IF CMP(Bkgnd,"color 200 200 200")
tv_BackGround "color" 120 120 120 // medium gray background
EXIT
END
IF CMP(Bkgnd,"color 120 120 120")
tv_BackGround "color" 60 60 60 // dark gray background
EXIT
END
IF CMP(Bkgnd,"color 60 60 60")
tv_BackGround "color" 1 1 1 // black background
EXIT
END
IF CMP(Bkgnd,"color 1 1 1")
tv_BackGround "check" 128 128 128 200 200 200 // checkered medium gray and light gray
EXIT
END
tv_BackGround "color" 255 255 255 // if any other background, then display white