T
* Tong *
Hi,
I'm trying to write an alert detection script.
Generally, the script loops to detect if the alert criteria is met,
and if so, alert the user. Somewhat like this:
for(;{
my $alerted;
my $flag=detect_flag
if($flag){
alert_user unless $alerted;
$alerted=1
}
}
The 'alert_user' can be as simple as a pop up window via Xdialog. Once the
alert goes off, it might take some time to resolve, but I don't want to
alert user again and again, hence the '$alerted' var. The problem is that
I need a way to clear the '$alerted' var. I think, to make it simple, the
best time is when the user confirm the alert pop up window.
Now, what's the easiest way to do it? The reason I wanted to use Xdialog is
because it's extreme easy to code, but I can't think of a way to clear the
'$alerted' var.
please help
thanks a lot
I'm trying to write an alert detection script.
Generally, the script loops to detect if the alert criteria is met,
and if so, alert the user. Somewhat like this:
for(;{
my $alerted;
my $flag=detect_flag
if($flag){
alert_user unless $alerted;
$alerted=1
}
}
The 'alert_user' can be as simple as a pop up window via Xdialog. Once the
alert goes off, it might take some time to resolve, but I don't want to
alert user again and again, hence the '$alerted' var. The problem is that
I need a way to clear the '$alerted' var. I think, to make it simple, the
best time is when the user confirm the alert pop up window.
Now, what's the easiest way to do it? The reason I wanted to use Xdialog is
because it's extreme easy to code, but I can't think of a way to clear the
'$alerted' var.
please help
thanks a lot