Detect Internet outages and react automatically in RunMacro
The Network Watcher command checks the Internet in the background while a macro runs and, on an outage, stops, pauses, changes IP via DCOM, runs a handler macro, or jumps to a label.
Prerequisites#
- Add Network Watcher and End If to the macro.
- For the IP change action: a configured DCOM/mobile network device.
Supported modes#
- RunMacro Runner
What it does#
The Network Watcher command is a background IF block: while the macro runs the steps inside the block, it quietly checks the Internet on an interval. After the configured number of consecutive failures it runs the action you chose — Stop, Pause, Change IP via DCOM, Run a handler macro, or Go to label. The check runs on its own thread, so the macro is never slowed down. For the IP-change action, DCOM disconnects, reconnects, then verifies with its own ping, repeating until the link is back; the watcher then returns to normal monitoring.
Screenshots & video#

When to use it#
- Long runs that should rotate IP as soon as the link drops.
- Stop a macro instead of letting it continue on failed data.
- Recover a DCOM/3G/4G connection without watching it yourself.
When not to use it#
- Do not use it to notify an external service during an outage, since Telegram/HTTP cannot send either.
Configuration steps#
- Add a Network › Network Watcher command.
- Pick the action under When the Internet drops.
- If you picked Change IP via DCOM, also pick the DCOM network.
- Set the check interval and consecutive failures. Save.
- Put the steps you want protected between this command and End If.
Every option explained#
Expected result#
Once running, Network Watcher guards the connection for the whole block and performs the chosen action on an outage.
Real example#
Example: change IP on outage, then continue#
- Network Watcher, action = Change IP via DCOM, pick the cellular network.
- Interval 30s, consecutive failures = 10 (the default).
- Put the main steps between this command and End If.
Limitations and failure cases#
- It detects loss of Internet access only, not slow links or per-site DNS failures.
- It pings 8.8.8.8/1.1.1.1 then tries a public-IP lookup; a network blocking both may read as offline.
Tips & common mistakes#
Verification details#
commands/network.py
