Bonjour, tout le monde, et merci pour le temps que vous allez m'accordez.
J'ai un script qui vérifie si ma connexion VPN est active (toutes les 5 secondes) mais, si pour une raison où une autre, je coupe la borne Airport, je reçois un message d'erreur. J'aimerais donc éditer mon script pour qu'il effectue la vérification uniquement si la borne airport est connectée. Comment m'y prendre ? Un genre de "if airport on then run the script else do nothing"
Pour le moment, mon script ressemble à ça:
on idle
tell application "System Events"
tell current location of network preferences
set myVPN to the service "VPNuniversity"
if myVPN is not null then
if current configuration of myVPN is not connected then
connect myVPN
end if
end if
end tell
return 5
end tell
end idle
Merci pour votre aide !
Partager