FaceTime藍號檢測,FaceTime藍號篩選,檢測數據是否開通FaceTime服務的方法。
FaceTime是蘋果公司iOS和macOS(以前稱Mac OS X或OS X)內置的一款視頻通話軟件,通過Wi-Fi或者蜂窩數據接入互聯網,在兩個裝有FaceTime的設備之間實現視頻通話。其要求通話雙方均具有裝有FaceTime的蘋果設備,蘋果ID以及可接入互聯網的3G/4G/5G或者Wi-Fi網絡。
一、Applescript實現藍號檢測功能
1.實現全自動無痕檢測手機號或郵箱號是否啟用或開通FaceTime服務
/* 需要注意的是:檢測是不是FaceTime數據,需要在手機號的前綴 +國家代碼即可,檢測郵箱號是否開通FaceTime服務則不需要加任何前綴。升級版參考相關文章: http://www.rzrgm.cn */
FaceTime藍號檢測代碼示例:
--get_ui()
facetime()
--獲取facetime應用所有ui元素
on get_ui()
tell application "FaceTime" to activate
tell application "System Events"
tell process "FaceTime"
tell window 1
entire contents
end tell
end tell
end tell
end get_ui
--facetime數據篩選主程序執行
on facetime()
tell application "Finder" to activate
tell application "Finder"
set chosenfile to (choose file)
end tell
tell application "FaceTime"
tell application "FaceTime" to activate
set phoneData to read chosenfile
set cards to paragraphs of phoneData
repeat with phone in cards
set num to the length of phone
if (num > 0) then
my check_data(phone)
delay 1
end if
end repeat
end tell
end facetime
# 檢測數據是否開通或啟用facetime
on check_data(phone)
tell application "System Events"
tell process "FaceTime"
--核心代碼...
end tell
end tell
end check_data
--記錄有效數據
on WritePhone(the_phone)
set num to the length of the_phone
if (num > 0) then
set fileName to date string of (current date)
set logFilePath to my current_folder_path() & "success/檢測成功的FaceTime數據.txt"
set this_file to (POSIX file logFilePath as string)
set this_story to the_phone & "
"
try
set fp to open for access this_file
set myText to read fp
if (myText does not contain the_phone) then
my write_to_file(this_story, this_file, true, true)
end if
on error
my write_to_file(this_story, this_file, true, true)
end try
end if
end WritePhone
--寫入文件
on write_to_file(this_data, target_file, append_data, append_end)
try
set the target_file to the target_file as text
set the open_target_file to ?
open for access file target_file with write permission
if append_data is false then
set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
else if append_end is false then
try
set fp to open for access target_file
set myText to read fp
set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
write myText to the open_target_file starting at eof
on error
write this_data to the open_target_file starting at eof
end try
else
write this_data to the open_target_file starting at eof
end if
close access the open_target_file
return target_file
on error
try
close access file target_file
end try
return false
end try
end write_to_file
--獲取當前文件的父文件夾路徑
on current_folder_path()
set UnixPath to POSIX path of ((path to me as text) & "::")
return UnixPath
end current_folder_path

浙公網安備 33010602011771號