我有以下代碼。它運行,我得到了我的結果,我認爲退出重複出現錯誤,獲得ipad名稱後,腳本仍然保持運行,直到超時。 任何人都可以告訴我代碼有什麼問題嗎?謝謝!AppleScript在退出後不會停止運行重複
set deviceName to "iPad"
tell application "System Events"
tell process "iTunes"
activate
repeat with i from 1 to the count of (row of outline 1 of scroll area 2 of window "iTunes")
repeat with j from 1 to the count of static text of row i of outline 1 of scroll area 2 of window "iTunes"
set xxxx to the value of item j of static text of row i of outline 1 of scroll area 2 of window "iTunes"
if (xxxx contains deviceName) then
print xxxx
click row i of outline 1 of scroll area 2 of window "iTunes"
exit repeat
end if
--exit repeat
end repeat
end repeat
end tell
end tell