Notifications not shown from AppleScripts

BTT 5.802 and macOS 15.7.2

When I run applescripts from BTT, the notifications are not shown.

As example, the folllowing code is showing the notifications if it runs from script editor, but not if it runs from a BTT action:

tell application "BetterTouchTool" to display notification "Hello world" -->script editor icon
delay 1
tell application "BetterTouchTool" to display_notification "Hello Andreas" --> btt icon
delay 1
tell application "System Events" to display notification "Hello everybody"

I have the notifications allowed for BTT in the system settings.

I wonder if it is a bug from BTT or something wrong in my setup.

Make sure BTT is not the active app while the notifications are posted - otherwise with the default macOS settings they are posted but only show up if you open the control center sidebar

I find that the problem is only ocurring when the source type is an applescript from scpt file.

If I run the previous code when the source type is an applescript from scpt file, the only notification that is triggered when BTT is not the active app is "Hello Andreas".

If I run the same code when the source type is an applescript>Inline Text, the 3 notifications are shown.

So it seems that when external scpt files are called by BTT, the notifications from other apps are ignored.

Could you replicate that?

Is it possible to fix that?

that was one of the reasons the display_notification function was added, making the standard "display notification" functions work in this scenario is not possible as far as I know.

I can show any notification easily with the standard tell application "whatever" to display notification "whatever" function when running external applescripts from other apps (for example I can do it with Keyboard Maestro).

Maybe this was an old limitation that can be solved now…