4
在Google Chrome瀏覽器(Mac)中,您可以通過從htttp://google.com按下Command + Shift + Period來激活Google語音搜索。用於觸發Google Chrome語音搜索鍵盤快捷鍵的OSX腳本
假設url http://google.com加載在chrome選項卡中並且搜索框處於焦點位置,不應該使用以下applescript工作嗎?
tell application "Google Chrome"
activate
tell application "System Events" to keystroke "." using {command down, shift down}
end tell
出於某種原因,它不會工作,我不明白爲什麼,因爲下面的腳本將填補與文本搜索字段預期:
tell application "Google Chrome"
activate
tell application "System Events" to keystroke "this test works as expected"
end tell
我怎樣才能觸發谷歌用腳本語音搜索?
的感謝!這很好 – user1385729