You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

macOS Mojave - AddressBook action does not work any more

Hi community,

this is my first question to ask to the community - it is the first time, the Apple support could not help me...

I just updated this morning to Mojave. It works fine, especially my Apple Script for initiating a phone call to our Auerswald telephone system.


I need to add my script to the contextmenu - in High Sierra I put it into

Library/Application Scripts/com.apple.AddressBook


But now in Mojave, this seems to be the wrong place 😟.


Does anybody know the right one????


Regards

S.

iMac, macOS Mojave (10.14)

Posted on Sep 25, 2018 6:03 AM

Reply

Similar questions

9 replies

Nov 21, 2018 8:10 AM in response to thomasfromrheinberg

Don't think that it'll help much, but yes:


property callUrl : "https://<YOUR SERVICE URL>"

on run {input, parameters}
  set cleaned_number to cleanNumber(item 1 of input)
  set cleaned_number to formatNumber(cleaned_number)
  return callUrl & cleaned_number
end run

on cleanNumber(numToDial) -- bring the number to the right format
  set theDigits to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
  set cleanedNumber to ""
  repeat with i from 1 to length of numToDial
  set j to (character i of numToDial)
  if j = "+" then set cleanedNumber to cleanedNumber & "00"
  if j is in theDigits then set cleanedNumber to cleanedNumber & j
  end repeat
  if (cleanedNumber is "") then
  return cleanedNumber
  end if
  if (character 1 of cleanedNumber is "0") then
  if (character 2 of cleanedNumber is "0") then
  set cleanedNumber to "+" & substring(cleanedNumber, 3, "")
  --set character 1 of test
  else
  set cleanedNumber to "+49" & substring(cleanedNumber, 2, "")
  end if
  end if
  return cleanedNumber
end cleanNumber

on formatNumber(numToDial) -- bring the number to the right format
  set cleanedNumber to numToDial
  if (substring(cleanedNumber, 0, 3) is "+49") then
  set cleanedNumber to "+49 " & substring(cleanedNumber, 4, "")
  end if
  set cleanedNumber to replace(cleanedNumber, "+", "%2B")
  set cleanedNumber to replace(cleanedNumber, " ", "+")
  return cleanedNumber
end formatNumber

--- left out some methods for substring, trim, ...


As you can see on the picture below, the script is part of an automator workflow. The script takes the first item of the input and creates an URL, which will be called by the workflow. The cleaning and formatting process is custom for my purpose, but you can adapt it to your needs. If you already have a Addressbook script, you probably can copy that over and just call it in the run method with with the given phone number.

User uploaded file

To use the service in your context menu, you have to activate it – totally intuitive - in System Preferences > Keyboard > Shortcuts > Services as explained, e.g., at https://www.maketecheasier.com/edit-context-menu-macos/


Btw. the name of the automator workflow file corresponds to the context menu entry.

Nov 21, 2018 5:48 AM in response to thomasfromrheinberg

You can put your script inside an Automator Action as quick action which takes telephone numbers as input (filtered text). As such you can select any text (also phone numbers in the address book) and call the number inside the selected text via control click and the context menu > services list. It's definitely not a nice solution but at least a quick and dirty work around.


Here an example how it looks (with german interface):

User uploaded fileUser uploaded file


I guess one of the major problems of the constantly worsening macOS is that all other os are still worse. So they can more or less screw things up without leaving us any choice but accepting it.

Nov 8, 2018 3:34 AM in response to luckman212

It's really a shame, that they removed that feature. I hope they bring it back soon.


Wasn't it the Mojave keynote in which Tim stated that Apple would now focus again on pro users? And what did they do? Silently removing real pro features! **** business economist, did they really believe a darken UI is bigger pro feature than scripting? Honors to Steve, he is definitely missing.

macOS Mojave - AddressBook action does not work any more

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.