Hey @peternlewis, I have a weird issue that cropped up recently relating to the %SystemVolume% token. I use Mic Drop to control my microphone, and I noticed as soon as I make use of the %SystemVolume% token, whether in an action that provides real-time feedback or the Value Inspector, if Mic Drop is running, the KM Engine slows down, and sometimes becomes unresponsive. I also sometimes lose my audio input at the same time.
I believe this is more related to Mic Drop, since it started with one of their recent version updates. I am in contact with Matt over at Mic Drop to see what his thoughts are on it, but I wanted to reach out here and ask if you could think of any reason why this particular token might cause issues.
if output muted of (get volume settings) then
return 0
else
return output volume of (get volume settings)
end if
So if that is going slow, something is wrong with either AppleScript, interprocess communication related to AppleScript, or something related to retrieving the volume.
I guess he could launch the macOS app "Shortcuts" which has a "Run AppleScript" action and insert that code there. If the problem persists, that backs up your conclusions.
I tried it myself, and the code runs quickly and provides the correct result.
Hmmm... thanks for the info @peternlewis and suggestion @Airy... I really don’t think it’s KM in this case, as none of my AppleScripts (and I have a lot of them dispersed throughout my macros) have any issues. Sounds like it is something related to Mic Drop itself. Thanks again!
If you can try the script above in Script Editor, and it has the same issue, then that would be something to report to the developer since it removes any potential implication of Keyboard Maestro in it and would be easier for the developer to test.
Hey @peternlewis I realized I likely misunderstood your last comment... I have ran that script in Script Debugger probably 100 times at different points of the day today, without any issue.
On top of that, if I use that AppleScript or another, similar one (such as the example below) in an if action with the Show Results enabled, it causes the same issue.
So it appears the problems only arises when using the %SystemVolume% token, or an AppleScript that interacts with the sound settings from within Keyboard Maestro.
Any ideas how this might correlate to the issue I’m seeing?
Running it from osascript in Terminal causes the issue, namely Mic Drop appears to “reload” the available audio sources (from what Matt over there has shared with me). Sounds more and more like it might be on their end.
Indeed! I sent Matt that info (and a link to the post here for context) and he said he would look into what is causing it. Thanks @peternlewis and @Airy for yall’s help!