Applescript成功实现iMessage蓝号过滤,iMessage数据筛选,iMessage蓝号检测是否注册iMessage应用

一、imessages数据检测的两种方式:
1.人工筛选,将要验证的号码输出到文件中,以逗号分隔。再将文件中的号码粘贴到iMessage客户端的地址栏,iMessage客户端会自动逐个检验该号码是否为iMessage账号,检验速度视网速而定。红色表示不是iMessage账号,蓝色表示iMessage账号。
2.编写苹果Mac Os操作系统下的脚本程序进行过滤(全自动无痕检测,无需人工干预),将数据输入到号码文本框之后,如果捕获到失败的异常则不是iMessage账号,捕获到成功则把数据保存下来。
3.升级版参考相关博文文章: https://www.cnblogs.com

二、实现全自动无痕检测数据是否启用或开通imessages
电脑版全自动无痕检测手机号是否注册iMessage(注意:检测不同国家手机号需要在手机号的前缀 +国家代码即可,自动无痕检测导入的txt数据,蓝色的手机号数据自动保存,有偿提供系统运行环境+检测程序或源码)
全自动无痕检测手机或邮箱号是否注册iMessage的代码示例:

-- 检测手机号或邮箱号是否注册imesaages,imessages蓝号检测
-- 检测是iMessge数据存放位置      ->    send/已开启im的数据.txt
-- 检测不是iMessge数据存放位置     ->    send/未开启im的数据.txt

startApp()
--Get_UI() --获取iMessages应用所有ui元素

--获取Messages应用所有ui元素
on Get_UI()
    tell application "Messages" to activate
    tell application "System Events"
        tell process "Messages"
            tell window 1
                entire contents
            end tell
        end tell
    end tell
end Get_UI


--检测数据是不是imessage数据
on startApp()
    tell application "Finder" to activate

    tell application "Finder"
        set chosenfile to (choose file)
    end tell

    tell application "Messages"
        tell application "Messages" to activate

        set phoneData to read chosenfile
        set cards to paragraphs of phoneData

        repeat with phone in cards
            --set msgText to (my AppendFace(" "))

            -- 假如字符串大于0,则草率判定是手机号
            set num to the length of phone
            if (num > 0) then
                --执行检测
                my sendMsg(phone)
                delay 1
            end if
        end repeat
        display dialog "恭喜,数据已全部检测完毕!"
    end tell
end startApp


# 执行检测
on sendMsg(phone)
    tell application "Messages" to activate
    tell application "System Events"
        tell process "Messages"
            tell window 1
                --核心代码,省略.........

                if static text of sheet 1 of window "信息" of application process "Messages" of application "System Events" exists then
                    --对未启用imessage的手机号码进行记录
                    my WritePhone(phone, "未开启im的数据.txt")
                else
                    --对已启用imessage的手机号码进行记录
                    my WritePhone(phone, "已开启im的数据.txt")
                end if


                delay 0.2
                key code 76


            end tell
        end tell
    end tell
end sendMsg


-- 记录有效手机号
on WritePhone(the_phone, file_name)
    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() & "send/" & file_name
        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

1.Mac OS电脑版全自动无痕检测数据是否是imessages数据(0.2-0.5秒检测一封,具体视网速和硬件性能而定)

2.苹果手机版(ios系统)全自动无痕检测数据是否imessages(全自动无痕检测,自动记录已开启和未开启数据)

  • 6
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: AppleScript是一种编程语言,可以编写Mac上的自动化脚本。通过编写AppleScript脚本,可以实现iMessage批量推送的功能。 实现过程如下: 1. 打开“脚本编辑器”应用程序,创建一个新的脚本。 2. 在脚本中输入以下代码: tell application "Messages" repeat with eachNumber in {"+14159998888", "+14159998887", "+14159998886"} set targetBuddy to buddy eachNumber of service "SMS" send "Hello, this is a message sent via AppleScript." to targetBuddy end repeat end tell 该代码的意思是:循环发送短信给三个电话号码,内容为“Hello, this is a message sent via AppleScript。” 3. 点击菜单栏的“运行”按钮,或是按下快捷键“command + R”,运行脚本。 4. 完成以上步骤后,iMessage就会自动发送短信给指定的电话号码。 需要注意的是,在使用此脚本前需要先打开iMessage,并确保所用的电话号码已被添加到联系人列表中。此外,由于AppleScript是由苹果公司开发的脚本语言,因此只能在Mac系统上使用。 ### 回答2: AppleScript 是一种简单易学,功能强大的脚本语言。使用 AppleScript,我们可以直接与 macOS 系统和各种应用程序进行交互。对于 iMessage 批量推送,也可以使用 AppleScript 实现。 首先,在 Mac 上打开 Script Editor。接下来,我们需要编写 AppleScript 代码来进行 iMessage 推送。下面是一个示例代码: ``` tell application "Messages" set targetMessage to "Hello, World!" -- 要推送的消息 set targetBuddies to {"+86-XXXXXXXXXXX","+86-XXXXXXXXXXX"} -- 要推送的联系人 repeat with i in targetBuddies set targetService to id of service "SMS" of application "Messages" set targetChat to a reference to (chat i of service id targetService) send targetMessage to targetChat end repeat end tell ``` 在上面的代码中,我们首先使用 `tell` 命令打开 Messages 应用程序,并设置要推送的消息和要推送的联系人。然后,我们使用 `repeat` 命令循环遍历要推送的联系人,使用 `id of service` 命令获取推送方式(此处为 SMS),并使用 `chat` 命令获取要推送的聊天窗口。最后,我们使用 `send` 命令将消息推送到指定的聊天窗口。 需要注意的是,我们可以在 `targetBuddies` 列表中添加任意数量的联系人号码。如果要添加更多联系人,只需将其号码添加到 `targetBuddies` 列表即可。 在完成代码编写之后,我们可以保存代码并运行脚本。我们也可以将脚本保存为应用程序,并双击运行。 使用 AppleScript 实现 iMessage 批量推送非常简单,只需要几行代码即可完成。这种方法适用于批量发送短信、通知和其他形式的消息。如果您需要自定义推送内容和联系人,请根据具体情况修改上述代码。 ### 回答3: Applescript 是一种基于 AppleScript 语言的脚本编程语言,可以用于 macOS 中的自动化和脚本编程。而 iMessage 则是 iOS 系统和 macOS 系统上的一款即时通讯软件,可以用于发送文字、图片、声音等信息。本文将介绍如何使用 Applescript 实现 iMessage 批量推送功能。 首先,我们需要了解一些 iMessage 的基本用法。要使用 Applescript 推送 iMessage,我们需要调用 Apple 操作系统的“Messages”应用程序上的API。 iMessage 有两种发送方式,分别是通过电话号码和电子邮件地址。如果您要通过电话号码发送 iMessage,则需要在电话号码前面添加“+86”来指定中国的电话区号。然后,我们需要将要发送的消息存储在变量中,以便在 Applescript 中使用。 接下来,我们需要编写 Applescript 代码以实现 iMessage 批量推送功能。Applescript 代码中应该包括以下部分: 1. 连接到 Messages 应用程序。 2. 声明一个变量,让 Applescript 知道要发送的电话号码或电子邮件地址。 3. 声明一个变量,让 Applescript 知道要发送的消息内容。 4. 循环发送多条消息,直到完成所有消息的发送。 下面是一个简单的 Applescript 脚本示例,可以实现 iMessage 批量推送功能: ``` tell application “Messages” set targetBuddies to {“+8612345678901”, “johndoe@email.com”} repeat with aBuddy in targetBuddies set targetMessage to “Hello from Applescript!” send targetMessage to buddy aBuddy of service “SMS/MMS” end repeat end tell ``` 在上述示例代码中,我们使用了 `targetBuddies` 变量来存储我们要发送 iMessage 的电话号码或电子邮件地址。然后,我们使用一个循环将消息 `“Hello from Applescript!”` 发送给每个接收者。最后,我们使用 `end tell` 来结束和关闭 Messages 应用程序。 总结来说,我们可以利用 Applescript 脚本调用 Apple 操作系统的 API 推送 iMessage实现批量推送功能。这样,我们就可以更有效地将消息发送给多个用户,提高工作效率。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值