有没有一个 workflow 可以实现以下需求:输入关键字调用浏览器(chrome )的历史访问记录和书签
另外再问下:输入关键字显示 google 的搜索提示, baidu 的有了, google 的没找到
哪位知道的烦请告之下,谢谢啦!😊
1
Bown 2015-09-07 10:07:02 +08:00
自己建一条 workflow 就行了, Templates 选 open custom URL in specified browser ,然后 URL 填 chrome://history/或 chrome://bookmarks/, Browser 选 Chrome ,自己设一个触发的 keyword
|
2
freedomSky 2015-09-07 11:19:03 +08:00
实现过搜索 Chrome 书签的,要用到 AppleScript ,不知道现在能用 JavaScript 不能
就是调用 Chrome 的接口遍历一下书签文件夹,最终将符合条件的内容按 Alfred 的要求输出一下 下边是一部分 AppleScript ,参考一下吧:) global rstXML on run argv set hdl to load script POSIX file (POSIX path of ((path to me as text ) & "::") & "handler.scpt") global allBookmarks set queryStr to argv as string set allBookmarks to {} set rstXML to "<?xml version=\"1.0\"?><items>" tell application "Google Chrome" set folders to (every bookmark folder of application "Google Chrome") repeat with folder in folders set f to folder hdl's dealFolder (f, allBookmarks, queryStr ) end repeat set rstXML to rstXML & "</items>" return rstXML end tell end run on dealItem (itm, allBookmarks, queryStr ) tell application "Google Chrome" set t to (title of itm ) as string set t to my q_encode (t ) set u to (URL of itm ) as string set u to my q_encode (u ) set end of allBookmarks to {ptitle:t, purl:u} # if t contains queryStr then set rstXML to rstXML & "<item uid=\"" & u & "\" arg=\"" & u & "\" valid=\"YES\" type=\"file\"> <title>" & t & "</title> <subtitle>" & u & "</subtitle> <icon>flickr.png</icon> </item>" # end if end tell end dealItem on dealFolder (curFld, allBookmarks, queryStr ) tell application "Google Chrome" tell curFld set itms to (every bookmark item ) repeat with itm in itms my dealItem (itm, allBookmarks, queryStr ) end repeat set flds to (every bookmark folder ) repeat with fld in flds my dealFolder (fld, allBookmarks, queryStr ) end repeat end tell end tell end dealFolder |
3
ynyounuo 2015-09-07 11:19:45 +08:00
|
5
je11yfish 2015-09-07 12:45:24 +08:00
|