Switch between scripts

They are in two different components. I tried using output signals of the robot as flags and using if condition to run each script but the if condition is never true.
For example: if robot.signalout.output(111, True):
and i set it to true before the if condition but still the condition is never true