![](/img/trans.png)
[英]Photoshop Applescript calling JavaScript causing error “Expected end of line, etc. but found identifier”
[英]Applescript JavaScript “End of Line but found identifier” Error when controlling Google Chrome
以下是我的AppleScript腳本的一部分,該腳本應單擊Google Chrome當前選項卡中名稱為“ connect”的元素。
tell app "Google Chrome"
do JavaScript "document.getElementsByName('connect').click();" in current tab of first window
end
當運行時,它返回以下語法錯誤:
預計行尾,但找到了標識符。
我將如何工作?
沒關系。 我想到了。
這是代碼:
tell application "Google Chrome"
execute front window's active tab javascript "document.getElementsByName('connect')[0].click()"
end tell
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.