How to Trigger an Action if the Number of Connected Monitors Changes

Published on November 25, 2014 by Marcus Tettmar in Automation, Scripting

Today I was asked if Macro Scheduler can trigger an action if the number of connected monitors changes. Yes, all we need is a way to determine how many monitors are connected to the system. VBScript is one way to do that. So then all we need is a loop that constantly checks this value. So we end up with something like this: