2013-05-09 1 views
0

저는 QuickTime으로 터미널에 기반한 비디오 스트레스 스크립트를 작성해 왔습니다. Quicktime으로 여러 비디오를 재생할 때 한 가지 문제가 있습니다. 위로/실행하는 것이 더 낫다비디오 스트레스 by Apple 스크립트

지금 당장 스크립트는 최대 12 개의 비디오를 동시에 재생할 수 있으며, 한 대의 데스크탑에서 모든 것을 구성 할 수 있지만, 내가 원하는 것은 전체를 열어 놓는 명령을 반복하는 것이다. 화면 (프리젠 테이션 모드)을 선택한 다음 다시 불러 오십시오. 이 프로세스는 그래픽 처리기와 램 및 프로세서에 많은 부담을줍니다. 그래서 그것을하고 싶습니다. 내 코드는 모두 비효율적이며 작동하지 않습니다. 나는 window ID를 사용하여 ID의 행렬을 얻는 방법을 생각해 보았지만이를 제어 할 수는 없었다.

여기 전체 화면/불완전 화면 모드 인 내 스크립트의 간소화 된 버전은 여기 있습니다. 현재 일부 동영상은 프리젠 테이션에서 제외되지만 일부는 제공되지 않으며 일정한 양이 아닙니다 (몇 번 1, 2 ~ 3 번). 도움/조언이 정말 감사 할 것입니다.

tell application "QuickTime Player" 
set open_windows to (every window where visible is true) 
set n to count of open_windows 
repeat n times 
    set presenting of document 1 to true 
    delay 5 

    tell application "Finder" 
     activate 
    end tell 
    delay 1 
end repeat 

--repeat n times 
try 
    set presenting of document 2 to false 
    delay 1 

    tell application "Finder" 
     activate 
    end tell 
    delay 1 
    --end repeat 
    set presenting of document 3 to false 
    delay 1 

    tell application "Finder" 
     activate 
    end tell 
    delay 1 
end try 

end tell 

답변

0

이 때로는 때로는 너무 나를 위해 창문을 생략 :

tell application "QuickTime Player" 
    repeat with d in documents 
     tell d to set presenting to true 
     delay 3 
    end repeat 
end tell 

당신이 할 수있는 모든 창을 여러 번을 통해 단지 루프 :

tell application "QuickTime Player" 
    repeat while presenting of documents contains false 
     repeat with d in (documents where presenting is false) 
      tell d to set presenting to true 
      delay 3 
     end repeat 
    end repeat 
end tell 

당신은 뭔가 리터로 문서를 참조 할 수 예 :

tell application "QuickTime Player" 
    repeat with w in windows 
     set i to id of w 
     tell document of w to set presenting to true 
    end repeat 
    window 1 where id is i 
end tell