苹果是否允许像scriptable (javascript)或pythonista (python)这样的第三方应用程序接受通过Siri语音命令提供的参数,如果允许,我们如何在可脚本(javascript)脚本中访问这些参数?如果没有,有没有什么办法可以让人写一个可脚本化的脚本,然后让它(以某种方式)接受一些语音输入?
到目前为止我所知道的
Scriptable提供了一个来自'share sheet‘的args示例,尽管它不完全清楚是否可以通过Siri语音接收一个类似的args变量
// Run from a share sheet to see which
// arguments are shared. Arguments are
// passed to a script when it is run
// from a share sheet.
// Configure the types of arguments
// a script supports from the script
// setttings. This script accepts all
// types of arguments and shows an alert
// with a summary of what ia being shared.
// This is useful to examine which
// values an app shares using the
// share sheet.
let summary = args.plainTexts.length
+ " texts\n"
+ args.images.length
+ " images\n"
+ args.urls.length
+ " URLs\n"
+ args.fileURLs.length
+ " file URLs"
let alert = new Alert()
alert.title = "Shared"
alert.message = summary
alert.addCancelAction("OK")
await alert.presentAlert()发布于 2020-06-26 06:58:18
不是的。Scriptable使用快捷方式来处理Siri语音命令,但不支持参数。
一种解决方法是在启动可编写脚本的脚本之前编辑快捷方式以开始听写,并将听写的结果传递给运行脚本块。
Here's a link到imgur相册,带有关于如何设置上述内容的屏幕截图。
https://stackoverflow.com/questions/61275124
复制相似问题