tell application "System Events" set currentAppName to name of first application process whose frontmost is true end tell tell application currentAppName display dialog "Your message here" with title "Your Title here" end tell