Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Screen Size for 3rd Monitor
I'm sure that this is super simple for others, but it has been a challenge for me.

How do I get the screen size (x y) for my 3rd monitor?   Huh
Macro Macro940
Copy      Help
int wid hei
GetWorkArea 0 0 wid hei 1 3
out F"{wid} {hei}"
Macro Macro940
Copy      Help
MonitorFromIndex 3 0 r
out "L=%i T=%i R=%i B=%i   W=%i H=%i" r.left r.right r.bottom r.right-r.left
Gintaras, you are the best!
Many thanks for such a quick response, it is greatly appreciated!
As a follow up, how is the monitor number determined?

According to windows, my 3 monitors are setup in the following order from left to right: 3, 1, 2 (see attached). Monitor 1 in this layout is my primary according to windows.

I wrote a test script to display a message on each monitor and QM thinks my monitors are in this order:  1, 3, 2

So, I'm not sure how to determine the order that QM sees my monitors. This makes it difficult to be sure that I am performing a function on the expected monitor.

Is there any way to know the order for sure?

Attached Files Image(s)
QM uses Windows function EnumDisplayMonitors. It returns monitors in different order than in Windows Settings. It seems there are no other ways.

Forum Jump:

Users browsing this thread: 1 Guest(s)