Auto FaceTime call using AppleScript, without confirmation I would like to automate a FaceTime call without having to confirm the call in the FaceTime app. Is there a way to do that?
EDIT:

When I execute the script I get this message in the upper right corner.
I would like to bypass this message so that the call starts automatically.
EDIT2:

Unfortunately I do not have this option under macOS Mojave 10.14.5
set phone_num to &quot;mailxyz@mail.com&quot;
do shell script &quot;open facetime://&quot; &amp; quoted form of phone_num
tell application &quot;System Events&quot;
    repeat until (button &quot;Call&quot; of window 1 of application process &quot;FaceTime&quot; exists)
        delay 1
    end repeat
    click button &quot;Call&quot; of window 1 of application process &quot;FaceTime&quot;
end tell
In macOS High Sierra the Call button in directly on the face of the FaceTime window and why click button "Call" of window 1 of application process "FaceTime" works.

Is this true for macOS Mojave too, and then when that button is clicked one also gets the Notification Center Alert, or when placing the call it only shows the Notification Center Alert with the Call button on it?

The following example AppleScript code will wait for Notification Center to display a window and click the Call button, assuming it has one.

tell application "System Events"
    repeat until (exists window 1 of application process "Notification Center")
        delay 0.1
    end repeat
    click button "Call" of window 1 of application process "Notification Center"
end tell


Obviously this does not take into account if there is more then one notification, say if one existed prior to the call being made and had not yet been dismissed. In that scenario, additional coding will be necessary to target the specific notification.

Update: After some additional testing, under macOS High Sierra, the previous paragraph may be an unnecessary statement if the result are the same under macOS Mojave. The testing revealed that if a notification is present when another one is displayed, then the latest notification displayed is placed at the top of the window list in Notification Center and is then window 1. In that case, the following example AppleScript code may work for you:

set phone_num to "mailxyz@mail.com"
do shell script "open facetime://" &amp; quoted form of phone_num
tell application "System Events"
    repeat until (exists window 1 of application process "Notification Center")
        delay 0.1
    end repeat
    click button "Call" of window 1 of application process "Notification Center"
end tell



This example code assumes in macOS Mojave when placing the call, in this manner, it only shows the Notification Center Alert with the Call button on it.




Note: The example AppleScript code is just that and does not contain any error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.