Code: Select all
## Get Stream Data ##
if {([catch {set CastInfo [exec fetch -q -A -m -T 1 -o - "http://$CastLogin:$CastPass@$CastIP:$CastPort/admin/icestatus.xml"];}])} {
incr CastErr;
if {($CastErr == "4")} {
set DetMC "offair.gif";
set CastInfo "";
} elseif {($CastErr > "4")} {
set CastErr "5";
};
} else {
set CastErr "0";
set DetMC "onair.gif";
set VarA [string first "\<icestatus\>" $CastInfo];
set VarA [string range $CastInfo $VarA [string length $CastInfo]];
set VarB [string first "\<\/icestatus\>" $VarA];
set VarB [expr $VarB - "1"];
set CastInfo [string range $VarA "11" $VarB];
};
Code: Select all
exec ./text.cmd 2> /dev/null
Code: Select all
exec -- fetch -q -A -m -T 1 -o - "http://$CastLogin:$CastPass@$CastIP:$CastPort/admin/icestatus.xml" 2>/dev/null &];
Code: Select all
[catch {exec -- fetch -q -A -m -T 1 -o - "http://$CastLogin:$CastPass@$CastIP:$CastPort/admin/icestatus.xml" 2>/dev/null};]
Code: Select all
if { [catch { .... } error0] } {
putlog "procname/partname - $error0"
return 0
}