I have a lot of shortcuts which show a notification hint after execution. Mainly I use for this:
display notification "Something"
in a AppleScript action (blocking).
After updating to version 3.870, these were no longer displayed. Even a downgrade to version 3.826 did not help at first. Only after I had removed BTT from the apps section in this file (with PrefsEditor):
~/Library/Preferences/com.apple.ncprefs.plist
and restarted my Mac, I was asked again to set the settings for notifications and since then it works again.
Then after I updated back to version 3.870, it didn't work again. Also removing BTT from com.apple.ncprefs.plist did nothing. I was not asked again for the notification settings and had to go back to version 3.826.
Unfortunately this looks like a not solvable issue.
A few years ago (macOS 10.14 , Apple introduced a new way to send notifications. This new way gives apps more flexibiliy and Apple has deprecated the old way. That's why I recently switched to the new notification framework.
However it looks like Apple Script is internally still using the old Framework. Now that's a problem because apps can not mix using these frameworks ;-(
I will add a new scripting function in BTT and a new predefined action as a replacement. (This will then also allow to add images). Unfortunately I don't think I can make the standard "display notification" work anymore.
error 15:17:11.396513+0200 usernoted Legacy client com.hegenberg.BetterTouchTool connecting to modern client. You can't mix modern clients with legacy clients. <ClientConnect: 0x00000001391be800 identifier: com.hegenberg.BetterTouchTool pid: 80432 type: Application>
somehow I can't believe this. That would mean that all apps with this framework would no longer be able to display notifications and not even those that allow script execution. All my other apps still work.
Does version 3.870 show any notification at all? I have not found an action to trigger this.
But why does the normal downgrade to version 3.268 not work (without reset the settings in the com.apple.ncprefs.plist) and why are they not requested for version 3.870?
Because macOS stores whether an app is using the modern framework or the old one. If it is registered as modern then old ones do not work anymore and vice versa ;-(
Downgrading doesn't reset the saved framework type of macOS.
However, I had reset the settings before running version 3.870. Actually, these should have been asked for. Maybe not, because the notification was not triggered.
3.870 currently can not show notifications through apple script regardless of the configuration. (Because Apple Script tries to go through the legacy framework, but BTT is now using the modern framework).
Let's see, I'll try some workarounds - dynamically replacing the display notification call when executing the Apple Script sounds most promising
3.873 alpha now replaces calls to display notification with
tell application "BetterTouchTool" to display_notification
This takes the exact same arguments as the original "display notification" but uses the new notification framework (on macOS >= 10.14). Also it has an additional parameter "image path" where you can put any file which is then attached to the notification.
tell application "BetterTouchTool" to display_notification "test content" with title "some title" subtitle "subtitle" sound name "frog" image path "/Users/andi/Downloads/download.png"
When using scpt files BTT can not replace it automatically, in such cases you need to manually replace the display notification in your files.
Not sure if something changed in Ventura, but unfortunately I'm still experiencing this issue. The following executes fine from Script Editor (the second line leads to a BTT notification) but inside BTT I get nothing:
BTT has permissions (see screenshot), and having BTT display a notification through the Mac's Script Editor works (tell application etc). But when running a script in BTT, notifications don't work. Is there a way for me to see any system response/error when executing the script in BTT?
To test, I tried the following: move mouse to top left corner triggers predefined "show notification". Nothing happens. I verified that the trigger works with an apple script that does display dialog, this works but no notifications. It's very weird (to me) that the Script Editor is able to make BTT display a notification but nothing inside BTT is able to do the same.
Thanks for your help btw. I realize that debugging this is very tricky...