Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"timeout" parameter not working on multiple alerts #47

Open
section83 opened this issue Mar 8, 2022 · 0 comments
Open

"timeout" parameter not working on multiple alerts #47

section83 opened this issue Mar 8, 2022 · 0 comments

Comments

@section83
Copy link

section83 commented Mar 8, 2022

The "timeout" parameter for Alerter doesn't work properly when multiple alerts are displayed at the same time in separate processes. For example, if 3 alerts are displayed, one will close normally but the other 2 will remain displayed until closed by the user. Clicking on the body of any alert does nothing. Only way to close these alerts is to click on the "Close" button.

AppleScript code used for testing:

use AppleScript version "2.4"
use scripting additions
set alerterPath to quoted form of (POSIX path of "Macintosh HD:Users:Home:alerter")
do shell script alerterPath & " -message 'Test1' -title 'Testing' -subtitle 'Subtitle' -timeout 10 -sender com.apple.script.id.MyApplet -actions '_' > /dev/null 2> /dev/null & "
do shell script alerterPath & " -message 'Test2' -title 'Testing' -subtitle 'Subtitle' -timeout 10 -sender com.apple.script.id.MyApplet -actions '_' > /dev/null 2> /dev/null & "
do shell script alerterPath & " -message 'Test3' -title 'Testing' -subtitle 'Subtitle' -timeout 10 -sender com.apple.script.id.MyApplet -actions '_' > /dev/null 2> /dev/null & "

I have found this behaviour in macOS 12.2, 10.15, 10.14, 10.13 and 10.12.

It also occurs in macOS 12.2 but there's an additional problem in that, at first, the alerts almost completely overlap. But, when the body of he top alert is clicked, they rearrange and display correctly. But, then, they don't close.

This behaviour also occurs if the sender parameter is omitted.

Also, sometimes, the alerts show in the wrong order e.g. Test1, Test3, Test2.

Fixes for this would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant