display alert "Select Messages First" message (selectedMessageCountPhrase & " The script will now abort." & return & return & "If you want to select all messages, choose Edit > Select All from the Mail menu bar before running this script." as text) as critical buttons {"Quit"} default button "Quit"