我有以下代码。它运行,我得到了我的结果,我认为退出重复有问题,在它获得 ipad 名称后,脚本仍在运行直到超时。谁能告诉我代码有什么问题?谢谢!
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