清除QQ同步助手的拼音排序

习惯用QQ同步助手做额外的备份,其中有一个功能叫:联系人排序,通过给联系人增加Phonetic First/Middle/Last Name字段,并为其中添加相应字段的“拼音”实现排序。

本来说这个功能只用于排序,但实测发现这个字段会用于siri的语音识别和朗读,结果就是你用拼音的方法读名字时它认不出来,而siri读通讯录名字会感觉很奇怪。

重新安装了QQ同步助手,发现只有排序功能而没有清除,于是想到了Apple Script,经过一翻搜索和实验,脚本如下:

  1. 打开Script editor,新建一个文件;
  2. 输入如下脚本:
tell application "Contacts"
	activate
	set the_people to every person
	repeat with tp in the_people
		try -- lazy way of skipping companies
			log tp
			set pfn to phonetic first name of tp
			set pln to phonetic last name of tp
			
			if pfn is not missing value then
				set phonetic first name of tp to missing value
			end if
			
			if pln is not missing value then
				set phonetic last name of tp to missing value
			end if
		end try
	end repeat
	
	save
end tell

执行即可:)

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *