wind speed controls the snow speed and temp controls the snow colour :)
#!/usr/bin/perl
#
######################################################################
$basedir = "/home/httpd/www/cgibin/software";
&weather();
sub weather {
open (FILE, "$basedir/kiad.txt");
for ($i =0; $i < 5; $i++) {
$temper = <FILE>;
}
close (FILE);
open (FILE, "$basedir/kiad.txt");
for ($i =0; $i < 11; $i++) {
$windspeed = <FILE>;
}
close (FILE);
# Round off speed
$wind = sprintf("%.0f",$windspeed);
# round off temp
$temp = sprintf("%.0f",$temper);
# multiply for effect ;P
$wind2 = "$wind" * 10;
print "Windspeed is '$wind2' and Temp is '$temp'\n\r";
$colour = "white";
if ($temp > 30) {$colour = "blue";}
if ($temp > 45) {$colour = "yellow";}
if ($temp > 60) {$colour = "orange";}
if ($temp > 80) {$colour = "red";}
# Kill old process
$xsnowkill = qx(kill -9 `ps ax | grep xsnow | grep -v grep | awk '{
print $1; }'`);
# print "$xsnowkill\n\n";
$xsnower = qx(xsnow -nosanta -notrees -norudolf -nokeepsnowonwindows
-nokeepsnowonscreen -sc $colour -yspeed $wind2 -xspeed $wind2);
# print "$xsnower\n";
--Quote:}
_______________________________________
o
/ --|
\ --|Quote:>:)---8
o
_______________________________________
Sent via Deja.com
http://www.deja.com/