How to display modal window using osascript or AppleScript in OS X
问题 How to display modal(over all apps, windows) window using osascript or AppleScript in OS X 10.6.8 and later. Here a script I do: #!/bin/bash osascript -e 'tell app "System Events" to display dialog "My Dialog" buttons {"OK"} default button 1 with title "My Dialog" with icon caution' The problem is that it's not modal. How to fix the following issue? 回答1: I wrote a script recently to monitor my macbook battery when it got low. To make sure I didn't miss the alert I did the following... repeat