{"id":2540,"date":"2014-11-25T09:57:20","date_gmt":"2014-11-25T09:57:20","guid":{"rendered":"https:\/\/www.mjtnet.com\/blog\/?p=2540"},"modified":"2014-11-25T09:57:20","modified_gmt":"2014-11-25T09:57:20","slug":"how-to-trigger-an-action-if-the-number-of-connected-monitors-changes","status":"publish","type":"post","link":"https:\/\/www.mjtnet.com\/blog\/2014\/11\/25\/how-to-trigger-an-action-if-the-number-of-connected-monitors-changes\/","title":{"rendered":"How to Trigger an Action if the Number of Connected Monitors Changes"},"content":{"rendered":"<p>Today I was asked if <a href=\"https:\/\/www.mjtnet.com\/macro-scheduler.htm\">Macro Scheduler<\/a> 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:<\/p>\n<p><script type=\"text\/javascript\" src=\"https:\/\/snipt.net\/embed\/07a6e35ca41b5fb2110376f5166a45b1\/\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/2540"}],"collection":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/comments?post=2540"}],"version-history":[{"count":1,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/2540\/revisions"}],"predecessor-version":[{"id":2542,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/2540\/revisions\/2542"}],"wp:attachment":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/media?parent=2540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/categories?post=2540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/tags?post=2540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}