Bonsoir didier
Y a-t-il un moyen pour déterminer si l'odinateur est connecté ou non à
l'internet ?
Pas de blagues... Je veux dire en utilisant une macro :-)
un truc simple mais peut etre pas assez sophistiqué
est d'ouvrir une page html et de voir si pas d'erreur
on pourrait taper dansles api systeme mais pas portable
peut etre voir ducote du module ucb de OOo sinon
bonne soiree
'non teste
function isConnected() as boolean
on error goto notConneted
open "http://www.google.fr" for input as #1
while not eof(1)
line input #1, uneLigne
reponse = reponse + uneLigne
wend
close(1)
if reponse <> "" then
isConnected = true
else
isConnected = false
endif
exit function
notConneted:
isConnected = false
end function
--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org
Indesko >> http://www.indesko.com
Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org
Livre "Programmation OpenOffice.org", Eyrolles 2004
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]