Tried searching first; several posts with the same error message. But, either the solution doesn’t apply or OP left us hanging with the solution.
Trying to create an uber-simple dock app to pause my music when the phone rings. the same snippet using the mute property works fine; but, when trying to use the playpause command i get the error: "“No result was returned from some part of this expression.”
The script runs fine and toggles the play/pause condition of the music player. I just get the error popup each time.
working mute property script:
tell application "Music"
if mute = true then
set mute to false
else
set mute to true
end if
end tell
playpause script that throws the error:
tell application "Music"
if (playpause) = true then
set playpause to false
else
set playpause to true
end if
end tell
note that the compiler put the () parens around the command after the if statement, which I understand is correctly formatted. Just stating for clarity since the mute property doesn’t require them.
suggestions welcome.