auto-toggle WebSocket DAT Connect Active switch

A problem I am having with the WebSocket DAT is that I always need to toggle the Connect>Active switch in order to initiate a handshake, AFTER I’ve already started my server.

Even if the Connect.Active is toggled ‘On’ already when I start the server.

ie in order to start a handshake
#1 -start server
#2 -toggle WebSocket DAT Connect>Active from ‘On’ to ‘Off’ back to ‘On’

What I really need is someway to automate #2 above when my application is launched.
Does anyone know of a way I could automate this somehow?

An easy way is to save the project always with the switch off, then create an Execute DAT, click on the On Start parameter, and in the start() area type:

op(‘name_of_websocket_dat’).par.active = 1

This will make it so that it activates when you start the project.

Or put the opposite in the Execute DAT, and then execute another script a frame later that turns it back on. Then you don’t have to worry about a possible situation where you save the project with the Websocket DAT active.

Thanks!