Is it possible to trigger a macro when no specified networks are available? For example, if there are no SSIDs called "HomeWiFi", "WorkWiFi" or "CottageWiFi" available, run a macro.
Do you mean "when I connect to a wireless network that isn't one of these: ...", or do you also want to include "not connected to any wireless network"?
For the first, trigger on "any wireless network is connected" then test the %WirelessNetwork%
token, exiting the macro if one of your "allowed" networks is listed.
For the second -- there's no actual event for not connecting, so no direct trigger. You might be able to run a periodic macro, enabled by a macro that triggers when you disconnect from one of your listed networks and disabled by one that triggers when you connect to them -- but it really depends on what you want the macro to do.
it really depends on what you want the macro to do
My goal is to connect to my phone's personal hotspot when I'm not in the vicinity of any of the networks I typically connect to.
I don't think you need a macro for that. MacOS supports that directly. Did you look into that?
I did, but not quite what I'm looking for as far as I can tell. The setting for this reads 'Allow this Mac to automatically discover nearby personal hotspots when no Wi-Fi network is available'.
So, there might be a network available but not one I want to connect to.
I think that means any network that you have previously connected to, not when a network is visible that you cannot connect to. So it should still work for you.
Oh, that would be great - I'll test it out (and if that's the case, make a suggestion to Apple that they rephrase that so that it reads no KNOWN network!). I had taken it to meant if there were no networks available whatsoever. Like if you're in the middle of the woods and need to use your laptop or something haha.
Thanks for doing the test. Odds are about 90% that it should work the way you need it.
It works, if you don't mind waiting 10 seconds for a "join the nearby hotspot" prompt to show up. It'll have to do!