j'ai réussi dans la nuit à faire ça :
tell application "Terminal"
activate
display notification "fin de l'accès"
end tell
tell application "System Events" to keystroke "sudo pico /etc/hosts "
tell application "System Events" to keystroke return
tell application "System Events" to keystroke "my password"
tell application "System Events" to keystroke return
delay 0.5
tell application "System Events" to keystroke "&éè;à;à;&" using shift down -- correspond avec le shift à 127.0.0.1
tell application "System Events" to keystroke " " -- quelques espace pour faire propre
tell application "System Events" to keystroke "www"
tell application "System Events" to keystroke ";" using shift down
tell application "System Events" to keystroke "netflix"
tell application "System Events" to keystroke ";" using shift down
tell application "System Events" to keystroke "com"
delay 0.1
tell application "System Events" to keystroke "x" using control down
delay 1
tell application "System Events" to keystroke "y"
tell application "System Events" to keystroke return
tell application "System Events" to keystroke "exit"
tell application "Terminal" to quit yes
y a quelques ratés mais ça fonctionne plutôt bien. faut surtout mettre des delay sinon ça va trop vite pour le terminal ^^
le fait de changer le host est une bonne idée. à voir où il se trouve et comment renommer des fichiers en applescript car ça je sais pas encore faire ^^
une idée sur les commandes que je dois utiliser ?