使用Automator通过Web搜索文件名

时间:2016-09-11 00:55:27

标签: macos automator

我正在尝试制作一个Automator脚本,该脚本从Finder获取文件名并使用Google在特定网站上搜索。

看起来我正确获取文件名并将其放入变量中,但我无法弄清楚是否有办法将变量传递给搜索URL。 URL没有可变输入字段。也许可以使用一些中间函数?

enter image description here

1 个答案:

答案 0 :(得分:1)

您可以使用此脚本,它会返回网址(不需要其他操作或变量):

on run {input, parameters}
    set tName to name of (info for (item 1 of input) without size)
    return "https://www.google.com/search?q=" & tName & "%20site%3Amywebpage.com"
end run
相关问题