Can you change networks programmatically?

I use two separate WiFi networks, one to access the internet, one internal for backups.

I know I can set up two locations and use AppleScript to switch between them.

Is there a (preferably cross-platform) way to change the active network with Xojo itself?



As always, as soon as I ask the question …

I can use a shell command

networksetup -setairportnetwork AirPort (SSID) (PASSWORD)

As far as the cross platform thing do you have a similar solution for Windows?

Not yet.

I believe the Windows equivalent is to shell a command similar to :

“netsh wlan connect name=(SSID)”