:: *****************************************************************************************************************************************************************
:: 20240117
:: 该脚本可以用于自动打开所指定的网页.
:: 操作方式 : 把需要打开的网页链接复制到pages.txt文档,并将pages.txt文档同这个脚本放到同一路径,然后直接运行即可.
:: 注意: 该脚本需要打开的指定网页多的话可能会卡,所以需要使用的电脑环境有足够的运行空间和足够的流畅的运行环境.
:: 作者: Darren Zhang
:: *****************************************************************************************************************************************************************
@echo off
::Set width, height, color (Black and white),cmd window title (these instructions can also be separated by a separate line)
mode con cols=112 lines=60 && color 0f && title Batch open web pages
cls
echo.
echo Now it is %date% %time%
echo ----------------------------------------------------------------------
echo The page is open and returning
echo .............................................
echo .............................................
echo .............................................
echo.
:: Find the pages file and open the page with the address written in the pages file (the delay is so that the open web video can play automatically)
for /f %%i in (pages.txt) do (start %%i && ping 127.0.0.1 -n 3.5 >nul)
echo ----------------------------------------------------------------------
echo Returned, whether to turn off all web videos?
choice /C YN
if errorlevel 2 goto Exit
title End process
taskkill /f /t /im msedge.exe
echo.
echo.
echo.
echo.
echo ----------------------------------------------------------------------
echo All open web videos have been closed, thanks for using! See you then!
ping 127.0.0.1 -n 3 >nul
echo.
pause
:Exit
exit