2014-02-25 4 views
1

공개 디스플레이 용으로 여러 개의 iMac을 배치해야하는 임무가 있습니다.공용 디스플레이 용 iMac 사용 중 유휴 키오스크 애플리케이션 및 유휴 상태 일 때 비디오 루프

그들은 응용 프로그램이 항상 (세라토 DJ) 실행 및 대기에 그들이 루프 비디오가 표시되어야 있어야합니다 - 루프에 saveHollywood 화면 보호기를 사용하고 내가 함께 놀 된

여러 비디오 파일을 재생할 이 작업에 대한 applescript - 부팅시 스크립트를 실행해야합니다. 많은 VLC 같은

내가 이러면 a를 알고 - 내가 늘 스크린 세이버에 찰 수 있기 때문에 응용 프로그램을 종료해야

tell application "Serato DJ"to activate 

on idle 
tell application "Serato DJ" to quit 
tell application "System Events" to start current screen saver 
end idle 

- 는 나는이

AppleScript를 같이 표시해야한다고 생각 계속할 제비 뽑기.

누군가가 도와주세요 올바른 방향으로 날 지점 수

어떤 도움을 크게,이 질문은 여전히 ​​관련성이 있는지

다니엘

+0

무엇을 유휴로 정의합니까? 예 : 아무도 5 분 동안 상호 작용하지 않았습니까? – adamh

답변

0

글쎄, 잘 모르겠어요 감상 할 수 있지만, 그렇다면 작동합니다 :

repeat 
    --This variable is how long the script waits before it turns the screen saver on 
    set timeToSleep to 300 
    -- 
    set idleTime to do shell script "ioreg -c IOHIDSystem | awk '/HIDIdleTime/ {print $NF/1000000000; exit}'" 
    considering numeric strings 
     if idleTime is greater than timeToSleep then 
      tell application "Serato DJ" to quit 
      tell application "System Events" to start current screen saver 
     end if 
     if idleTime is less than timeToSleep then 
      if application "Serato DJ" is not running then 
       try 
        do shell script "killall ScreenSaverEngine" 
        tell application "Serato DJ" to activate 
       end try 
      end if 
     end if 
    end considering 
    delay 1 
end repeat