Skip to content

Instantly share code, notes, and snippets.

@ishowta
Last active October 22, 2020 19:29
Show Gist options
  • Save ishowta/b5676c8852eec3805a7636d4433f7f04 to your computer and use it in GitHub Desktop.
Save ishowta/b5676c8852eec3805a7636d4433f7f04 to your computer and use it in GitHub Desktop.
[WIP] Monitor iphone & quest battery dead
@echo off
set errmes=ARP エントリが見つかりませんでした。
set iphone=192.168.11.3
set quest=192.168.11.12
arp -d %iphone%
ping %iphone% -n 1 -w 10000
arp -a %iphone% > tmpfile
set /p res= < tmpfile
if "%res%"=="%errmes%" (
msg * "iPhone is dead!"
)
arp -d %quest%
ping %quest% -n 1 -w 10000
arp -a %quest% > tmpfile
set /p res= < tmpfile
if "%res%"=="%errmes%" (
msg * "quest is dead!"
)
@ishowta
Copy link
Author

ishowta commented Oct 22, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment