applescript - AppleScript 发送 WhatsApp
问题描述
我正在使用 Code1 打开与手机上保存的号码的聊天,之后我使用另一个代码来编写和发送消息现在我想要一个新的代码而不是 code1 来打开与未保存的号码的聊天
代码1
on execute_javascript(jquery, whatsapp, conversation_title)
set app_is_running to "Google Chrome"
tell application "Google Chrome"
tell active tab of window 1
execute javascript ("var conversation_title = \"" & conversation_title & "\";")
execute javascript jquery
execute javascript whatsapp
end tell
end tell
end execute_javascript
on run (arguments)
set javascript_folder to POSIX path of ((the path to me as text) & "::")
set jquery_file to (POSIX file (javascript_folder & "js/jquery.min.js"))
set whatsapp_file to (POSIX file (javascript_folder & "js/whatsapp.js"))
open for access jquery_file
set jquery to (read jquery_file)
close access jquery_file
open for access whatsapp_file
set whatsapp to (read whatsapp_file)
close access whatsapp_file
set conversation_title to "conversation_title"
return execute_javascript(jquery, whatsapp, conversation_title)
end run
解决方案
推荐阅读
- java - 创建可运行的 JAR 文件 _ 缺少 VM 参数 _ 仅在 IDE 中运行
- javascript - nextjs:序列化从“/prints/[name]”中的“getStaticProps”返回的“.product”时出错
- python - Pandas - 合并常用列的合并操作
- php - 在没有插件的永久链接 woocommerce 中删除 /shop/ 或 /product/
- c++ - 什么系列的内在函数将完成这个 paeth 预测代码?
- visual-studio-code - Windows 中的 Visual Studio Code 管理员权限
- flutter - 如何在颤振中创建垂直虚线?
- python - 我随机收到一个新的 500 未知错误超时
- javascript - 为什么我总是抛出这个错误?节点:内部 /modules /cjs/ loader 944 Throw Err ^(找不到模块)
- react-native - 基于来自 MQTT 的订阅编写文本