Switching between connections within a script

The system under test is actually two systems, each with its own VNC connection. I’d like to be able to use the same script to control both machines - is this possible? If so, what is the syntax for switching between connections?

Thanks!

You would just use the connect command to change the active connection. If the connection doesn’t yet exist, it will be made, and if it already exists, it’s just made the active connection. You can switch back and forth as many times as you need to and with as many SUTs as required.

Thank you! I was sure that capability existed, but I hadn’t found that command yet.

A follow-up: one of my connections continually returns “error” in the Connection List, even though I can ping that system, and I can view its desktop using a standalone VNC viewer. Any thoughts?

I’m assuming that you’re using RealVNC for the server and that you have the ecnryption set to on. It needs to be set to “Prefer off” since the encryption is a RealVNC proprietary format that is only supported when you are also using a RealVNC viewer.

Boom. Done. Thanks again : )