リモート PDF ファイルにリンクしている URL が約 1000 個あり、Safari で検索できるものとそうでないものを判断する必要があります。スクリプトをループさせて Safari で URL を開いていますが、以下の最後の 2 つの手順で行き詰まっています。
誰か助けてくれませんか?ありがとう
スクリプトは次のことを行う必要があります。
各 URL について:
サファリに言う
- 指定された URL (この場合はリモート PDF) を開く
Apple Fではなく、右クリックでポップアップする検索を使用して、文字「a」のPDFを検索します
検索結果をファイルに書き込む
set urlList to {"http://pricelist.list.com/pricelists/A/AEA_11-15-12.pdf", "http://pricelist.list.com/pricelists/A/API_1608_04-05-13.pdf", "http://pricelist.list.com/pricelists/A/Access_02-01-12.pdf", "http://pricelist.list.com/pricelists/A/Allparts_Retail_01-01-11.pdf"} set numURLs to (count urlList) repeat with i from 1 to (numURLs) set theURL to (item i of urlList) tell application "Safari" open location theURL activate --Perform search --Write results to file end tell tell application "System Events" tell process "Safari" click menu item "Close Other Tabs" of menu "File" of menu bar 1 end tell end tell delay 5
リピート終了