No state toggle - is this possible?
Phew. Bought a Stream Deck to help out with managing multiple online meeting tools as my MacBook sits on a shelf and some physical keys are always a bonus. I have a global mic input toggle script I've been using but if I'm right the only way to do toggled icons for a plugin, is if it is enabled.
Is that right? I've got the Zoom plugin and it has a mic toggle icon. Be amazing to have that icon state ability for toggle applescripts as well.
BUT I have no clue if this is doable, or indeed how to do it. Any thoughts?
Funny I have actually the same need for a multi state.
I ended up just changing the manifest for this plugin, so you get a multi state alternative for it in the menu.
{
"Actions": [
{
"Icon": "ScriptIcon",
"Name": "RunAppleScript",
"States": [
{
"Image": "ScriptIcon",
"FontSize": "12",
"FontStyle": "Bold",
"TitleAlignment": "bottom",
"TitleColor": "#ffffff",
"Title": "Applescript"
}
],
"Tooltip": "Run Applescript",
"UUID": "com.mushoo.runapplescript.action"
},
{
"Icon": "ScriptIcon",
"Name": "RunAppleScript MS",
"States": [
{
"Image": "ScriptIcon",
"FontSize": "12",
"FontStyle": "Bold",
"TitleAlignment": "bottom",
"TitleColor": "#ffffff",
"Title": "Applescript"
},
{
"Image": "ScriptIcon",
"FontSize": "12",
"FontStyle": "Bold",
"TitleAlignment": "bottom",
"TitleColor": "#ffffff",
"Title": "Applescript"
}
],
"Tooltip": "Run Applescript",
"UUID": "com.mushoo.runapplescript.action2"
}
],
"Author": "Mike Schapiro",
"CodePath": "RunApplescript",
"PropertyInspectorPath": "index_pi.html",
"Description": "Run an arbitrary chunk of Applescript code, or a .scpt file",
"Name": "RunAppleScript",
"Icon": "ScriptIcon",
"Version": "1.0",
"OS": [
{
"Platform": "mac",
"MinimumVersion" : "10.11"
}
]
}
And used the following applescript (but I understand you already have yours) :
set c to do shell script "/usr/local/bin/SwitchAudioSource -c"
if c is "Scarlett 2i2 USB" then
do shell script "/usr/local/bin/SwitchAudioSource -s 'Built-in Output'"
else
do shell script "/usr/local/bin/SwitchAudioSource -s 'Scarlett 2i2 USB'"
end if
The problem is it doesn't stay in sync if I change output by any other means but it's working
How do you change the manifest? Sorry I'm an absolute dunce with dev tools
You will find that file in the following directory :
~/Library/Application Support/com.elgato.StreamDeck/Plugins/com.mushoo.RunAppleScript.sdPlugin
You can modify it according to what I put in my previous post.