Hey there clever coders. I need some help writing a script to run an event but only when a specific device is on. The way I'm calling the event the event conditions aren't respected. Or actually maybe everything could just be tossed into one script and the event could be ditched. My event sends a command to Media Player Classic on my desktop to pause or play. So for example to pause MPC I just run an immediate script command like so: &hs.geturl "192.168.1.2", "/command.html?wm_command=888", False, 13579. I have virtual devices for paused and playing that are controlled by EventGhost. So I need to be able to send the above command but only if the EventGhost controlled virtual device for MPC playing is on. Make sense?
EDIT:
Will this do it?
EDIT 2:
Nope. Doesn't work. Is there a complete idiot's guide to HS3 scripts?
EDIT:
Will this do it?
Code:
Sub Main(params as object) Dim MPC On As Boolean = hs.IsOn(hs.DeviceExistsCode("\624")) If MPC On = True then &hs.geturl "192.168.1.2", "/command.html?wm_command=888", False, 13579 End if End Sub
EDIT 2:
Nope. Doesn't work. Is there a complete idiot's guide to HS3 scripts?
Comment