tell application "System Events" tell process "FaceTime" set linkButton to button 1 of window 1 click linkButton if menu of linkButton is {} then display dialog "is empty" else click menu item 1 of menu of linkButton display dialog "is not empty" end if end tell end tell