My AT script...
Posted: 15 Jan 2017 15:55
Code: Select all
@echo off
:AT
Rem Enter time
set AT=00:00
Rem Enter command
set DO=start cmd
:ClockMain
set time=%time%
if %time:~1,1%==: goto :timeA
if %time:~2,1%==: goto :timeB
goto :ClockMain
:timeA
set A=0
set B=%time:~0,1%
set C=%time:~2,1%
set D=%time:~3,1%
goto :DoAt
:timeB
set A=%time:~0,1%
set B=%time:~1,1%
set C=%time:~3,1%
set D=%time:~4,1%
goto :DoAt
:DoAt
set Mytime=%A%%B%:%C%%D%
if %Mytime%==%AT% %DO%
echo %Mytime% %AT%
timeout /t 1 > null.txt
del null.txt
cls
Goto :ClockMain