Some AppleScript scripts contain notifications and run from Shortcuts. I noticed that calling notifications in AppleScript code does not work in Shortcuts.
Example, it works if run it in AppleScript, but it will not work if run it in Shortcuts.
display notification "Test notify message" with title "Test title"
I need to provide additional permissions or is it a “problem” of design?
I’m sure you have a typo.
Which one doesn’t work?
FYI, It’s not just Shortcuts. I’ve noticed problems displaying notifications in appleScript when called from other appleScripts (via load script/run script) or from Fast Scripts.
FWIW, I find ‘notifications’ to be a lot more sensitive than ‘dialog’. It often requires either moving outside of any tell block or being very explicit as to what is handling the command.
Really. Thank you, I fixed it.
Usually my scripts are simple and I never use calls to other scripts. My skill doesn’t allow it. But I didn’t know that.
@Mockman Yes, I’ve never encountered any problems with the “Alert” or “Dialog” display.
I see, so it’s most likely some kind of design problem.