// instantiate hali object
var HAL = new ActiveXObject("HALiContol.HAli");
while(HAL.Init()==false) {
Timer.DoSleep(500);
}
Then when I need to launch something, I have HAL execute a VBScript calling sC and setting a flag. Then sC goes in a grabs the info it needs:
function Devices::FlagUpdate(Index) {
with (Devices.Flags) {
case dsOn:
if (Item(Index).Name=="HALFlag") {
HALZone = HAL.Sensors.ItemByName("ZONE").State;
HALPlaylist = HAL.Sensors.ItemByName("PLAYLIST").State;
Devices.Flags.Item("HALFlag").State=0;
ShellCmd.Run("perl medianet.pl " + HALZone + " " + HALPlaylist);
}
...
No comments:
Post a Comment