windows - Manipulate cmd ping color based on time -


my internet not working , i'd check quality based on cmd windows tool. believe it's task simple enough handle.
i've begun making shortcut can have easy access command:

    c:\windows\system32\ping.exe 8.8.8.8 -t 

now trying transform cmd ping command visually responsive 1 based on output. i'd make color change according time response.
after looking , not finding related, believe it's either impossible or no 1 has ever tried.

thank :)
pd: (in case there unclear ask , i'll gladly answer)

@echo off setlocal set loops=10 :loop /f "tokens=3delims==" %%a in ('ping 8.8.8.8 -n 1') /f "delims=m" %%b in ("%%a") echo %%b&color %%b&goto cchgd :cchgd pause set /a loops-=1 if %loops% gtr 0 goto loop color  goto :eof 

a simple demonstration - repeats ping 10 times, changing colours depending on response. manipulate wish...


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -