This script is capable of detecting which monitor this macro was activated, and only launch/switch to a chrome(or any) window within that monitor. Multi-monitor users are prone to suffer from frustration as their macro keys switch to a window in the incorrect monitor if they have a few instances open, this solves that issue. The code is thoroughly commented for easy adaptability to other applications or use-cases.
This script is capable of detecting which monitor this macro was activated, and only launch/switch to a chrome(or any) window within that monitor. Multi-monitor users are prone to suffer from frustration as their macro keys switch to a window in the incorrect monitor if they have a few instances open, this solves that issue. The code is thoroughly commented for easy adaptability to other applications or use-cases.