Last active
June 21, 2022 14:44
-
-
Save skutov/5ea66f1cdf58e2c336afbf69f5c92608 to your computer and use it in GitHub Desktop.
Script to controll a panasonic projector (or any with a HTTP interface) over network using AppleScript. This was written for use from within Qlab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set powerOn to "/cgi-bin/power_on.cgi" | |
set powerOff to "/cgi-bin/power_off.cgi" | |
set shutterClose to "/cgi-bin/proj_ctl.cgi?key=shutter_on&lang=e&osd=on" | |
set shutterOpen to "/cgi-bin/proj_ctl.cgi?key=shutter_off&lang=e&osd=on" | |
set setSourceHDMI1 to "/cgi-bin/proj_ctl.cgi?key=hdmi&lang=e&osd=on" | |
set theServer to "192.168.0.100" -- set this to the ip address of the projector | |
set theCommand to powerOn --set the command required, option are, powerOn, powerOff, shutterClose, shutterOpen | |
set theUser to "dispadmin" | |
set thePass to "password" | |
set theProtocol to "http" -- vs https | |
set theUrl to theProtocol & "://" & theServer & theCommand | |
set myFile to "/dev/null" | |
set curlScript to "/usr/bin/curl --connect-timeout 1 --anyauth --user" & " " & theUser & ":" & thePass & " -L " & theUrl's quoted form & " -o " & myFile | |
do shell script curlScript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment