Page 1 of 1

Creating a traffic light connection

Posted: Wed Dec 07, 2022 7:52 pm
by collin-b
I'm trying to configure my scripts to use traffic lights and I feel like I understand the usage of traffic lights, but I just can't seem to figure out how to create one.

All the research I've done has led me around in circles. But let's see if I have it right. A connection's type is based off of the element that it is coming from. I can get the connection to have the type of move or filter, but not traffic light. I've tried touching the connection and and changing the type manually, but I couldn't find the correct property.

So, assuming I'm correct in my understanding. What elements produce a traffic light connection?
And is there a way to manually change the type of the connection or is it a private property?

Currently using Switch Fall 2021, if that makes a difference.

Thanks,
Collin

Re: Creating a traffic light connection

Posted: Wed Dec 07, 2022 9:24 pm
by jan_suhr
When you create a Switch Script you can define how the outgoing connections should be, one of the options is a traffic light.

You can not change a currently existing app or element in Switch to have a traffic light connection if it doesn't have one from the beginning.

Re: Creating a traffic light connection

Posted: Wed Dec 07, 2022 9:33 pm
by collin-b
I knew it had to be something obvious that I was overlooking, thanks.

Re: Creating a traffic light connection

Posted: Thu Dec 08, 2022 8:58 am
by freddyp
collin-b wrote: Wed Dec 07, 2022 7:52 pm I'm trying to configure my scripts to use traffic lights ...
Does "my scripts" refer to Switch scripts that you use or that you created yourself? If the former, then what Jan wrote is valid. If the latter, then you have to change the properties of your script in Switch Scripter to use traffic-lights and in the code you have to used sendToData, sendToLog instead of sendToSingle.

Re: Creating a traffic light connection

Posted: Thu Dec 08, 2022 3:11 pm
by collin-b
In this circumstance I was referring to a switch script that I use as a wrapper to call the scripts that do the brunt of the work. The properties should be the solution I was looking for.