MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos

Create a Button On Your Mac or iPhone To Make a Call With One Tap Or Click

mardi 21 mai 2019, 15:00 , par MacMost
If you want to make it as easy as possible to call people you can set up a single-action icon that you can tap on your iPhone or click on your Mac to make the call. On the iPhone you can use the Shortcuts app to build a shortcut and place it on your Home screen. On your Mac you can use Automator with a shell script and some JavaScript to place an app in your Dock to make the call with a single click.

Check out Create a Button On Your Mac or iPhone To Make a Call With One Tap Or Click at YouTube for closed captioning and more options.
Video Transcript: Hi, this is Gary with Today let me show you how to make a phone call with one tap on your iPhone or one click on your Mac.
MacMost is brought to you thanks to its community of supporters. Join us and get exclusive content at
So what if you want to have as few steps as possible to call important people either on your phone or using FaceTime on your Mac. Usually there are a few steps involved unless you use Siri. But you can actually create an icon on your phone or on your Mac that with just one action will make that call.
On the iPhone you probably guessed I'm going to use the Shortcuts app. If you don't have it you can get it for free from Apple in the App Store. So you go into Shortcuts here. I'm going to create a new shortcut and it's going to be a fairly simple one. The first thing I want to do is grab the phone number from my Contacts. So I'm going to search for an action involving Contacts. Contacts is the one I want. I can hit the Plus button there and search for a contact. Then I select the contact. So that will grab the contact. Next thing I want to do is grab the phone number from the contact. So I'm going to search for Phone. I'm going to use Get Phone Number from Input. That will grab the phone numbers from that contact. If there's more than one phone number in there through it's going to give me an extra step. I'll show you how to avoid that.
The last part I want to add is Call. So you notice it gives you some suggestions here. You can use these suggestions to avoid this entire thing and just have this as one action. But if you don't see the suggestion you want you're going to have to do these steps. So I'm going to use the Call Action. Now I want to go to Settings. I want to give this a good name. Hit Done. I want to go to the Icon. I can go to GIF and I can actually use say a telephone GIF but I can also go and select a photo and take a photo of that person and use that as the icon. I can set the color as well.
Hit Done. Then I can use Add to Home Screen to add a button. That button will basically make that phone call with one tap.
Now instead of using Contacts and get Phone Numbers from Input I can do something else. I can use one called Phone Number and then that actually allows me to enter in the number. I want to move it before Call and enter in the phone number. Now it will just simply call that number. This helps if you have more than one phone number for a contact. It'll still do it in one step if you provide the actual phone number.
Okay. That's pretty easy to do on the iPhone. On the Mac it's a little harder. We're going to use Automator but we're actually not going to use any Automator actions at all. We're going to use Shell Script. Just one line to make a call and then we're going to use a little bit of Javascript code to make it one click.
So let's bring up Automator. I'm going to search for it using Spotlight and run it. Then I'm going to create a New Document and let's make that an Application. The first thing I want to add is a Shell Script. So I'm going to search for Shell over here on the left. Then add Run Shell Script. The Shell Script I want to run is just something that's going to actually trigger a phone call using the FaceTime app. So you can see all I need is open facetime:// and then the phone number there. That will actually open FaceTime and make the phone call.
I'm going to hit the Run button here and it will run FaceTime. You can see it puts the phone number up there. Then it has the Call button. But it says Click FaceTime to make this call. So I have to do another step. So now the key is can I get rid of that second step. I can using a bit of JavaScript. So I'm going to search for JavaScript here and add Run JavaScript as the next action. Now what I want to add here is just something that's basically going to click that Call button.
So the first line of code is just going to activate FaceTime. So it's going to make sure that FaceTime is the running app. The next line of code is going to click that button. It's basically going to go Application("System Events").then look for the application processes. grab by name the one called FaceTime. look at all the windows in it and grab the window by name that is FaceTime. Look at all the buttons in it and grab the button byName ("Call") and then perform a click action on it.
How did I get all this. A lot of trial and error. I knew I needed to do this to get the application processes. I was able to list them all out and get FaceTime is the name. Then I was able to look at the windows and then find that FaceTime was the name of that window. A little of trial and error there. Look at all the buttons and then look at each button's name and find out that the second button was call. The first one was cancel. Then say click.
So what will happen now is this thing will run and it will click that button. Let's try it. So you can see there it made the phone call. Now you may at this point get asked to give permission from Automator to do this. It will open up System Preferences. We'll look at that more a little bit later because it's definitely going to ask for permission once you've created the app. Now all I need to do is Save this out. I can Save it to the desktop. Name it something like Call John there. Save it as an application. Now I can look on the desktop and see that it's there. I can change the icon the standard way you do on the Mac.
But when I run it there the first time it's going to ask me if I want this to control system events. I'll say okay. I'll have to go into System Preferences and in System Preferences it's going jump right here to Accessibility. I can unlock this then look for this Call John script that I setup here. I can run it and it will press the button.
Now you can put this application in a folder in your Document's folder. Maybe with a bunch of similar ones to make a phone calls. Once you have it there you can always add it to the Dock as well. You can call from the Dock with one click. Now for this to work on your Mac you need to be making a FaceTime call to somebody with an Apple ID or you need to have you Mac and your iPhone setup so your Mac can use your iPhone to make phone calls. In this case I don't have that because this is a demo user account. It's not hooked up to an iPhone. But it will work on a regular account. It's really handy for someone that makes lots of phone calls to the same people all the time and wants to be able to quickly make those phone calls with one tap or one click.

Related Posts:
Which Facetime Phone Call Option Should I Use? ― Call Blocking Apps/services for iPhone ― How To Customize the Triple-Click iPhone Accessibility Shortcut ― “Add [shortcut] To Siri” Has “Type Phrase” Not Red Record Phrase Button. Why?

The shell script is simply:
open facetime://3035551212
The JavaScript (JXA) is:
function run(input, parameters) {
Application('System Events').applicationProcesses.byName('FaceTime').windows.byName('FaceTime').buttons.byName('Call').click();
return input;
News copyright owned by their original publishers | Copyright © 2004 - 2020 Zicos / 440Network
Date Actuelle
mer. 8 avril - 10:58 CEST