Rad Posted March 4, 2010 Share Posted March 4, 2010 (edited) My second monitor has been dead for a few weeks, and a friend of mine is urging me to make my program work with his second monitor. I plan to add a hotkey for a single monitor and separate hotkey for each monitor individually, as well as the entire desktop - but I figured that out.I have done some searching but could only find how to get the entire screenspace of a desktop. And I do not understand DLL's so I am unsure if that users32.dll would have what I am looking for to get each monitor's information. It would be great to have this in a 2d-array formatted like so:$Monitors[0][0] = 3 ;Number of monitors $Monitors[1][0] = 1024 ;First monitor's width $Monitors[1][1] = 1280 ;First monitor's height $Monitors[1][2] = 0 ;First monitor's X-origin $Monitors[1][3] = 0 ;First monitor's Y-origin $Monitors[2][0] = 1400 ;Second monitor's width $Monitors[2][1] = 1050 ;Second monitor's height $Monitors[2][2] = -1400 ;Second monitor's X-origin $Monitors[2][3] = 0 ;Second monitor's Y-origin $Monitors[3][0] = 800 ;Third monitor's width $Monitors[3][1] = 600 ;Third monitor's height $Monitors[3][2] = 1024 ;First monitor's X-origin $Monitors[3][3] = 0 ;First monitor's Y-originThis example would be 3 monitors side by side, with the first one in the middle and second on the left. All of them would be aligned to the top of the first monitor. If this were lined up physically, you would have the right monitor stacked on a few books and the middle monitor sitting on a magazine, provided the base is the same height.If there is already a way to get these values, please let me know. Can't find anything in the helpfile, and I do not have another monitor available so this i'll have to hope the code is right and have him test it for me. Edited March 4, 2010 by Rad Link to comment Share on other sites More sharing options...
JohnOne Posted March 4, 2010 Share Posted March 4, 2010 Only ever seen this info in the faqs, not sure if its what you need. http://www.autoitscript.com/wiki/FAQ#How_can_I_get_the_screen_resolution_In_multiple_monitor_setups.3F AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Rad Posted March 4, 2010 Author Share Posted March 4, 2010 Yeah, that is the same code that I linked before, except it's the total resolution of multiple monitors. The dll call's return arrays, they might include separate monitor information... Just a guess, but I can't test it with just one monitor. I will try to figure this out some time when he has free time, but would love to make some progress before hand. Link to comment Share on other sites More sharing options...
UEZ Posted March 4, 2010 Share Posted March 4, 2010 Maybe this helps, too: #include <Array.au3> Global $hScreen = WinGetHandle("Program Manager") Global $aScreen_Res = WinGetPos($hScreen) #cs $array[0] = X position $array[1] = Y position $array[2] = Width $array[3] = Height #ce _ArrayDisplay($aScreen_Res) Exit UEZ hudsonhock 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wliebkem Posted March 13, 2010 Share Posted March 13, 2010 If there is already a way to get these values, please let me know. Can't find anything in the helpfile, and I do not have another monitor available so this i'll have to hope the code is right and have him test it for me.Looks like this may do what you want:Multi Monitor Resolution Into Array Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now