Can anyone help me with coming up with an example for

while IsRed = true or IsGreen = true then run through these commands until they are both false

i've tried the various ways i know and it's been quite a while since using AcTool so any suggestions to get me going the right direction would be appreciated very much!