On 29 Aug 2010, at 21:56, Geoff Hollingshead wrote:I've read the posts about controlling a panasonic dw6300 projector. I've got the script controlling the shutter working but I want to go to the next step and have a script to turn the projector on and off when I'm done using it.Ideally I would love to also learn how to create a script that would input the username and password for the projector so that at the beginning of the show it's just a 1 button operation for me.From what I remember of controlling a Panasonic projector, the buttons you are looking for are links on the user interface webpage, so all you need to do is load the equivalent url ('tell application "Safari" to open location "some_url"'). In order to login at the same time, you should just need to prefix the url with "username:password@", eg: "http://username:pass...@192.168.0.1". Isn't this basically the same as controlling the shutter though?
Gareth & Huw from Stage Sound Services do this all the time, so they probably have exactly the script you need. I think they're both on this list... I vaguely remember a discussion about this, but I can't find it now!
Rich
________________________________________________________
WHEN REPLYING, PLEASE QUOTE ONLY WHAT YOU NEED. Thanks!
Change your preferences or unsubscribe here:
http://lists.figure53.com/listinfo.cgi/qlab-figure53.com
> And just for the record (since i just found it) to control the panasonic projectors WITHOUT having safari open you can use this script:
>
> set newFile to "new file"
> tell application "URL Access Scripting"
> download "http://user1:pana...@192.168.10.201/cgi-bin/proj_ctl.cgi?key=shutter_off&lang=e&osd=on" to newFile replacing yes with authentication
> quit
>
>
> Just change the IP address and the part that says shutter_off to whatever you need it to be. WARNING...although this is neater than always having safari open, I found that if there was no projector at the IP address you specify it appears to lock qlab up while its waiting for a timeout.
Try this variation:
set newFile to "new file"
tell application "URL Access Scripting"
ignoring application responses
with timeout of 30 seconds
download "http://user1:pana...@192.168.10.201/cgi-bin/proj_ctl.cgi?key=shutter_off&lang=e&osd=on" to newFile replacing yes with authentication
end timeout
quit
end ignoring
end tell
I think the timeout block will mean that URL Access Scripting will quit even if there is no projector, whilst the ignoring block will mean that QLab doesn't have to hang around waiting. Without an explicit timeout I think AppleScript will wait 60 seconds before giving up on something. A try block wouldn't prevent this wait.
This script does of course create a file called "new file" in your root folder, which may or may not surprise you one day.
Is "osd=on" correct? It caught my eye as I'd expect OSD to be off on a projector, but maybe it's a different OSD...
I'd be inclined to develop it further to something like this (but I can't test it - no projector!):
set userAction to item 1 of {"pow_on", "pow_off", "shutter_on", "shutter_off"} -- Use this to pick an action
set downloadedFile to ((path to desktop) as string) & "Projector control.html"
tell application "URL Access Scripting"
ignoring application responses
with timeout of 30 seconds
download "http://user1:pana...@192.168.10.201/cgi-bin/proj_ctl.cgi?key=" & userAction & "&lang=e&osd=on" to downloadedFile replacing yes with authentication
end timeout
quit
end ignoring
end tell
--e