Forums > MaxMSP

Is possible detect screen resolution?

October 21, 2010 | 5:18 am

Is possible detect screen resolution without use any external?
If somebody know, please post some example.
Thankyou !


October 21, 2010 | 5:29 am

you can get the screen size with [screensize]. If you need to know more about your monitor, check out jit.displays.

-Ben


October 21, 2010 | 5:47 am

Thankyou ben

Now i dont know how do simple thing

Main monitor is configured 800 x 600

screensize report this infomration: 0 0 800 600

What im trying to do is compare if screen is configured to that resolution, if the resolution is 800 x 600 i want have value out 1 , if different , value output should be 0
How can compare that string of numbers ?


October 21, 2010 | 6:16 am

In this case, it seems easiest to add the two numbers, and then do [== 1400].


October 21, 2010 | 6:57 am

Tim, is possible see some example : )
Please !


October 21, 2010 | 10:59 am

Larsen, what is there to show in an example?

Btw, I don’t really like the addition method, Tim, since there may be equal totals, although not commonly :P:
768 + 576 (PAL) = 854 + 480 (WVGA)
1280 + 854 = 1366 + 768

– Pasted Max Patch, click to expand. –

October 21, 2010 | 12:55 pm

but tim, this will also report "true" when the monitor is in 700*700 mode.
 


October 21, 2010 | 1:51 pm

you could use [match]:

– Pasted Max Patch, click to expand. –

M


October 21, 2010 | 2:06 pm

Thank you very usefull.


October 21, 2010 | 7:10 pm

You’re all correct lol, I guess I’m a little out of touch with the range of screen resolutions whose sides would sum equally…….I didn’t think of any after a casual contemplate.

But absolutely! Don’t add and compare then :)


Viewing 10 posts - 1 through 10 (of 10 total)