Windows10下电脑版微信未读消息自动弹窗工具

一、功能:

监听获取电脑版微信消息,新消息十秒未查看自动弹窗

二、使用方法:

文本编辑器ansi编码文件类型bat保存双击执行

三、声明:

禁止加入恶意代码,否则后果自负,有问题发私信

四、代码:

@echo off
setlocal enabledelayedexpansion
echo 电脑版微信新信息提示工具
echo.
echo 作者:phenix
echo.
echo 邮箱:[email protected]
echo.
for /f "tokens=* delims=" %%m in ('dir /b %temp%^|find "msg_"') do (
del /q %temp%\%%m>nul
)
:main
echo msgbox "您有新的未查看的微信消息!">%temp%\msg.vbs
echo wscript.echo "暂无新的未查看的微信消息!">%temp%\nomsg.vbs
echo wscript.sleep 1000*10>%temp%\sleep.vbs
set wechat_root=%USERPROFILE%\Documents\WeChat Files\
set msg_flag=0
set idx=1
for /f "tokens=* delims=" %%a in ('dir /b "!wechat_root!"^|find "wxid_"') do (
set wechat_dir=%%a
set wechat_file=Msg\Multi\MSG0.db-wal
set wechat_fullpath=!wechat_root!\!wechat_dir!\!wechat_file!
if exist "!wechat_fullpath!" (
set msg_startlen=
set msg_endlen=
if exist %temp%\msg_len_!idx!.txt (
set /p msg_startlen=<%temp%\msg_len_!idx!.txt
for /f "tokens=* delims=" %%1 in ('"powershell -command (ls ^'!wechat_fullpath!^').LastAccessTimeUtc"') do (
set msg_endlen=%%1
echo !msg_endlen!>%temp%\msg_len_!idx!.txt
rem echo !msg_startlen!
rem echo !msg_endlen!
)
) else (
for /f "tokens=* delims=" %%1 in ('"powershell -command (ls ^'!wechat_fullpath!^').LastAccessTimeUtc"') do (
echo %%1>%temp%\msg_len_!idx!.txt
)
)
if "!msg_startlen!" neq "!msg_endlen!" (
start /wait /b cscript /nologo %temp%\sleep.vbs
set startdate=
set enddate=
if exist %temp%\msg_date_!idx!.txt (
for /f "tokens=* delims=" %%1 in (%temp%\msg_date_!idx!.txt) do (
set startdate=%%1
)
for /f "tokens=* delims=" %%1 in ('"powershell -command (ls ^'%PUBLIC%\Desktop\微信.lnk^').LastAccessTimeUtc"') do (
set enddate=%%1
echo !enddate!>%temp%\msg_date_!idx!.txt
)
rem echo !startdate!
rem echo !enddate!
) else (
for /f "tokens=* delims=" %%1 in ('"powershell -command (ls ^'%PUBLIC%\Desktop\微信.lnk^').LastAccessTimeUtc"') do (
echo %%1>%temp%\msg_date_!idx!.txt
)
)
if "!startdate!" equ "!enddate!" (
start %PUBLIC%\Desktop\微信.lnk
for /f "tokens=* delims=" %%1 in ('"powershell -command (ls ^'%PUBLIC%\Desktop\微信.lnk^').LastAccessTimeUtc"') do (
echo %%1>%temp%\msg_date_!idx!.txt
)
set msg_flag=1
)
) else (
for /f "tokens=* delims=" %%1 in ('"powershell -command (ls ^'%PUBLIC%\Desktop\微信.lnk^').LastAccessTimeUtc"') do (
echo %%1>%temp%\msg_date_!idx!.txt
)
)
)
set /a idx+=1
)
if !msg_flag! equ 0 (
cscript /nologo %temp%\nomsg.vbs
)
start /wait /b cscript /nologo %temp%\sleep.vbs
goto :main

 

你可能感兴趣的:(电脑版微信,微信pc,微信电脑,wechat)