Jump to content

pdy

Member
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

pdy's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. I see. In your case, a phone number can contain brackets. Try the following script. query="{query}" phone_num=$(/usr/libexec/PlistBuddy -c 'Print:Phone' "$query" | grep -o -m 1 '^[[:space:]]*\(+\?[[:digit:][:space:])(-]\+\)[:space:]\?$') echo -n $phone_num
  2. It seems like the regular expression fails to match a phone number. Hi @petebocken, could you post the output of the following command from terminal? /usr/libexec/PlistBuddy -c 'Print:Phone' '/Users/peter/Library/Application Support/AddressBook/Sources/336CF002-F2FC-41D8-B761-68FBD7453613/Metadata/52299394-FE3F-4A59-9F22-73EDC8AADDEA:ABPerson.abcdp' The command basically outputs the phone entry of a given contact. For privacy reason, you can mask part of the phone number.
  3. The workflow uses an applescript to extract a phone number from a contact name. Just replace it with a bash/zsh script.
  4. query="{query}" phone_num=$(/usr/libexec/PlistBuddy -c 'Print:Phone' "$query" | grep -o -m 1 '^[[:space:]]*\(+\?[[:digit:][:space:]-]\+\)[:space:]\?$') echo -n $phone_num I have temporarily fixed the problem by replacing the appleScript to extract a phone number with the above bash script. Hope this helps Reference: https://www.alfredforum.com/topic/19240-search-and-pass-contacts-phone-number/
  5. Call or message by contact name does not work on Ventura. See also below.
  6. It seems that the applescript that extracts the phone number does not work anymore. Does anyone knows how to fix it? Thanks!
  7. Same here. The debugger output the following messages. [01:24:44.503] ERROR: Call or SMS contact[Run NSAppleScript] { NSAppleScriptErrorAppName = Contacts; NSAppleScriptErrorBriefMessage = "Not authorized to send Apple events to Contacts."; NSAppleScriptErrorMessage = "Not authorized to send Apple events to Contacts."; NSAppleScriptErrorNumber = "-1743"; NSAppleScriptErrorRange = "NSRange: {262, 5}"; }
×
×
  • Create New...