"Show notification" with notification that closes when clicked?

I’ve written a couple of scripts that use the “Show notification” command to signal when they’re finished and what they’ve accomplished; they both create a file when run. The notification has “Show” and “Close” buttons - and when I click “Show,” the AppleScript application starts up again, which is probably not what the user wants (the user may want to see the file created by the application).

Is there any way, in AppleScript, to show a notification that can only close itself when clicked? I see that full-scale applications have notifications that have only a “Close” region. Is that possible from an AppleScript application?

Hi,

due to AppleScript’s single thread design it’s not able to (easily) handle the necessary callbacks.