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

Multiple Contexts breaks AppleScript 'current context' property #325

Closed
dfaulkner opened this issue Apr 22, 2014 · 0 comments · Fixed by #328
Closed

Multiple Contexts breaks AppleScript 'current context' property #325

dfaulkner opened this issue Apr 22, 2014 · 0 comments · Fixed by #328

Comments

@dfaulkner
Copy link

In #316 there is a suggestion to use osascript (AppleScript) to retrieve the current context for use in shell scripts:

function current_context {
   osascript -e 'tell application "ControlPlane"' -e 'get current context' -e 'end tell'
}

This was working fine until multiple contexts were introduced. Now, the menu bar icon shows the correct (two) contexts, but using the cited code yields a different, unselected, context entirely. The color of the icon in the menu bar varies. Sometimes it's the color of the context indicated by the osacript, other times it's the color of one of the contexts listed in the menu bar.

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