Thread perl/tk: repeat: Wann das nächste mal? (2 answers)
Opened by pktm at 2004-12-26 23:51

jemand
 2004-12-27 17:30
#42711 #42711
User since
2004-05-14
231 Artikel
BenutzerIn
[default_avatar]
mach doch einfach so wie bei nem norm. countdown die sekunden angezeigt und dann wennz null ist wird das event ausgeführt
halt so:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sub down{
my $nextm = stll(shift, 2);
my $nexts = stll(shift, 2); #hier noch nexts und nextm zweistellig machen
$fenster->after(1000 => sub { $text3->configure(-text => $nextm .':'. $nexts);
if($nextm <= 0 and $nexts <= 0){
event();
} else {
if($nexts == 0){
$nextm--; #nextm = nächtse minute
$nexts = 59; #nexts= nächstesekunde
} else { $nexts--; }
down($nextm, $nexts); }
}
);
}


ist prakisgeteste weilz nähmlich aus meim countdown-timer kommt
print uc 'i',chr(29*4).q+'s +.++($_=q-m-),++$_;
print chr for 116,$_[0],97,$_[0],98;
print 'ug,',chr(), scalar reverse qq?!erutaef a s'ti?;

View full thread perl/tk: repeat: Wann das nächste mal?