Advertisement
FADZILH

PJLink Network Control Applescript

Oct 26th, 2017
1,012
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --
  2.  
  3. set powerOn to "%1POWR 1"
  4. set powerOff to "%1POWR 0"
  5. set shutterClose to "%1AVMT 11" -- Video mute ON instruction in the PJLink specification.
  6. set shutterOpen to "%1AVMT 10" -- Video mute OFF instruction in the PJLink specification.
  7. set shutterCloseAudioMute to "%1AVMT 31" -- Video and audio mute ON instruction in the PJLink specification.
  8. set shutterOpenAudioOn to "%1AVMT 30" -- Video and audio mute OFF instruction in the PJLink specification.
  9.  
  10. # Do not change anything above this line!
  11.  
  12.  
  13. set theServer to "192.168.1.xxx" -- Set this to the IP address of the projector.
  14. set theCommand to shutterCloseAudioMute -- Set the command required. (Options are: powerOn , powerOff , shutterClose , shutterOpen , shutterCloseAudioMute , shutterOpenAudioOn )
  15. set thePort to "4352"
  16.  
  17. # !!! For Panasonic projectors use  shutterCloseAudioMute  and  shutterOpenAudioOn  to control the shutter.
  18.  
  19. # Do not change anything below this line!
  20.  
  21. try
  22.     do shell script "{ echo " & theCommand & "; sleep 1;} | telnet " & theServer & " " & thePort
  23. end try
  24.  
  25. # This script sends PJLink commands to port 4352 over Telnet. It was compiled by FED. (http://fadzilh.com)
  26. # It is a fork of Mic Pool's original that controlled Panasonic projectors using cURL. (https://micpool.com)
  27. # For more information on the PJLink specification visit http://pjlink.jbmia.or.jp/english/index.html
  28.  
  29. --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement