Quote:
I posted just to show you a way to get rid of 10 boring seconds where the users asks himself if the script hangs


Ahh... you don't lose the wait.

That "|" in your conditional will always evaluate true while $sleepy is less than 10:
 Code:
while $objhttp.readyState <> 4 | $sleepy<10


A small nip 'n' tuck should sort that out:
 Code:
while $objhttp.readyState <> 4 AND $sleepy<10


Riposte!