Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PersonalHotspot spoon does not work on macOS 12 #275

Open
dschuessler opened this issue Aug 8, 2022 · 2 comments
Open

PersonalHotspot spoon does not work on macOS 12 #275

dschuessler opened this issue Aug 8, 2022 · 2 comments

Comments

@dschuessler
Copy link

dschuessler commented Aug 8, 2022

The following sample code does nothing:

spoon.SpoonInstall:andUse(
  "PersonalHotspot",
  {
    config = {
      hotspotName = "iPhone",
    },
  }
)

spoon.PersonalHotspot:connect()

I had a look into the spoon's code and it is apparently supposed to open the Wi-Fi menu bar item and click on the entry. When I copy the relevant Javascript code over to macOS' script editor, it already fails to fetch the menu bar item:

Error: TypeError: undefined is not an object (evaluating 'wifiMenuBarItem.menus')

This might be a result of somewhat recent macOS updates. I can't find an easy solution right away but I leave this here for reference, in case I get around having a closer look.

@malob
Copy link
Contributor

malob commented Aug 9, 2022

I'll have a look into this on the weekend.

@dschuessler
Copy link
Author

When I tried to fix it myself, I stumbled over a great writeup about scripting the menu bar in Big Sur by @geofftaylor.

Ultimately, I didn't succeed. (UI Browser fails to break down the UI item hierarchy of the Wi-Fi menu, at least on my machine with macOS 12.) But I leave it here in case it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants