Workaround on Sonoma for %WirelessNetwork% not working as it used to

Continuing the discussion from Sonoma Wireless Compatibility:

I think this was explained in the original post, but in case anyone else didn't figure it out, I found that I can still test for a particular wireless network.

I have a macro triggered by the launch of a couple of applications, both of which need folders on my NAS. Previously, the macro started with a check of %WirelessNetwork% to see if it matched my home network. If it matches, the macro uses AppleScript to mount the NAS volumes.

After upgrading to Sonoma, this stopped working. But all I've had to do is insert another action at the beginning - a "Get Location" that saves the location to a variable that doesn't get used. Then, the test of the %WirelessNetwork% works as it always did.

2 Likes

I believe you only need to run the Get Location action once, then enable Location Permissions in the system preferences, and then the wireless should work.

In all likelihood you could then revert to Keyboard Maestro 10 if you wanted to and it would probably continue to work. Unfortunately, Apple have made it fairly clear they don't care that the API fails irredeemably and expect applications to use the location API to trigger allowing the use of the wireless API so we're stuck with this (though in Keyboard Maestro 11 I will continue to try to ensure it is made as seamless as possible, I obviously can't go back and update the previous versions).

I tried that but couldn't get it to work. I'm sure I misunderstood something or didn't follow the steps properly.

What didn't work?

Did the Get Location action return a location?

Did you get prompted to allow Location permissions?

Is Keyboard Maestro listed in the Location permissions?

I think the best thing to do would be for you to delete this thread, because I'm taking up air time talking about what I thought was a solution when you already have one. I don't want to distract anyone.

Did the Get Location action return a location?
A: It didn't appear to until I included the action in my macro, but I could well be wrong.

Did you get prompted to allow Location permissions?
A: Yes

Is Keyboard Maestro listed in the Location permissions?
A: Yes, Keyboard Maestro was set to allow locations. The engine wasn't, so I set it to allow, but don't know whether that was necessary.

As I said, please feel free to delete!

1 Like

Yes, the engine is necessary.

There is always always value to be had in a discussion being available.