Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Get rid of flicker of echo display  (Read 5747 times)

0 Members and 1 Guest are viewing this topic.

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Get rid of flicker of echo display
« on: April 27, 2017, 07:38:22 AM »
Put this together to log only failed pings with request time out. But was playing around with a way to have the output showing and not flickering, but also I dont want to affect how fast this runs either. I know that I could put a sleep condition before the goto to make it display longer before refresh. I sized the shell window down to only show the

Quote
Ping of Device Was Successful
On Thu 04/27/2017 at 9:31:07.84
Ping Logger V2.0 Running...

And this way you dont see multiples of each test scrolling. I tried of CLS, but it makes the output almost hidden with constant flicker. Also tried a bunch of echos as a refresh method instead of clear screen but then the output looks like an older TV with the rolling of the picture. I have avoided use of sleep because I want to avoid slowing down the batch if possible to get as precise log data.  Maybe its just the nature of the beast to have the fast execution of this that it will flicker. I guess I am just a perfectionist in that this does as intended, but I guess curious if there is a method that can be implemented that gets rid of flicker and  shows the date and time of each test loop and condition.  ;D

By the way 127.0.0.1 is just for testing purposes. The actual IP address will be entered and saved to this for each IP address to be logged. You can change it to some IP address that doesnt exist to see the error condition and the log start to append date and times.

Code: [Select]
@echo off
:restart

echo. Ping Logger v2.0 Running...

ping 127.0.0.1 -n 1 | find "Reply from" > nul
if %ERRORLEVEL% == 0 goto Device_Replied

ping 127.0.0.1 -n 1 | find "Request timed out" > nul
if %ERRORLEVEL% == 0 goto No_Reply


echo. Possible invalid IP address.
goto restart

:Device_Replied
echo. Ping of Device Was Succesful.
echo. On %date% at %time%
goto restart

:No_Reply
echo. No Reply from Device. Request timed out.
echo. On %date% at %time%
echo. %date% at %time% >>PingLog104.log
goto restart

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Get rid of flicker of echo display
« Reply #1 on: April 29, 2017, 09:29:54 AM »
Closing this request.... did some research and only way to get rid of flicker would be to slow it down. So its fine as is.  :)