- Alias Annonce {
- sockclose Annonce
- sockopen Annonce <www.nomsite.fr> 80
- .timerSockAnnonce 1 180 sockclose Annonce
- }
-
- on *:sockopen:Annonce: {
- if $sockerr > 0 { sockclose $sockname | return }
- sockwrite -tn $sockname GET <http://www.nomsite.fr/Annonceenfichiertexte.txt>
- }
-
- on *:sockread:Annonce: {
- if $sockerr > 0 return
- sockread %AnnonceRead
- if $sockbr == 0 { return }
- if (%AnnonceRead == $null) { %AnnonceRead = Aucune News }
- dialog -m Annonce Annonce
- sockclose $sockname
- }
-
- Dialog Annonce {
- TITLE "Info"
- SIZE -1 -1 350 100
- OPTION NOTHEME
- LIST 100, 2 2 346 80, VSBAR, HSBAR
- BUTTON "&Fermer", 10, 265 75 70 20, OK, CANCEL, DEFAULT, FLAT
- }
-
- On *:dialog:annonce:init:0: {
- If ( %AnnonceRead != $null ) && ( %AnnonceRead != %AnnonceAncien ) {
- Did -ra Annonce 100
- Did -a Annonce 100 %AnnonceRead
- Set %AnnonceAncien %AnnonceRead
- .timer 1 5 dialog -x Annonce Annonce
- }
- Else { dialog -x Annonce Annonce }
- Unset %AnnonceRead
- }
-
- ; Pour que l'exécution se fasse au bout d'une minute de connec. ben ouais on a pas tous l'ADSL :op
- On *:START: {
- .Timer 1 60 Annonce
- }
Alias Annonce {
sockclose Annonce
sockopen Annonce <www.nomsite.fr> 80
.timerSockAnnonce 1 180 sockclose Annonce
}
on *:sockopen:Annonce: {
if $sockerr > 0 { sockclose $sockname | return }
sockwrite -tn $sockname GET <http://www.nomsite.fr/Annonceenfichiertexte.txt>
}
on *:sockread:Annonce: {
if $sockerr > 0 return
sockread %AnnonceRead
if $sockbr == 0 { return }
if (%AnnonceRead == $null) { %AnnonceRead = Aucune News }
dialog -m Annonce Annonce
sockclose $sockname
}
Dialog Annonce {
TITLE "Info"
SIZE -1 -1 350 100
OPTION NOTHEME
LIST 100, 2 2 346 80, VSBAR, HSBAR
BUTTON "&Fermer", 10, 265 75 70 20, OK, CANCEL, DEFAULT, FLAT
}
On *:dialog:annonce:init:0: {
If ( %AnnonceRead != $null ) && ( %AnnonceRead != %AnnonceAncien ) {
Did -ra Annonce 100
Did -a Annonce 100 %AnnonceRead
Set %AnnonceAncien %AnnonceRead
.timer 1 5 dialog -x Annonce Annonce
}
Else { dialog -x Annonce Annonce }
Unset %AnnonceRead
}
; Pour que l'exécution se fasse au bout d'une minute de connec. ben ouais on a pas tous l'ADSL :op
On *:START: {
.Timer 1 60 Annonce
}