关键字自动点击器

时间:2013-09-17 23:26:03

标签: javascript google-chrome-extension applescript

我想要一个JavaScript代码,允许我指定某个关键字并让Twitter点击包含该关键字的链接。该脚本应该用于谷歌浏览器,并且必须与互联网Twitter源TweetDeck一起使用。我试过这个但是没有用。

set myKeyword to "Jordan"

tell application "Google Chrome"
    tell window 1 to tell active tab
        set URL to "https://web.tweetdeck.com/"
        delay 3
        set num_links to (execute javascript "document.links.length") - 1
        repeat with i from 0 to num_links
            set myLink to execute javascript "document.links[" & i & "].href"
            if myLink contains myKeyword then
                execute javascript "document.links[" & i & "].click()"
            end if
        end repeat
    end tell
end tell

0 个答案:

没有答案