D4rk^S0ul Posted September 27, 2005 Posted September 27, 2005 i am currently trying to use pixelchecksum i was wondering how i get a small block no igger then a cm at X:512 Y:384?
hgeras Posted September 27, 2005 Posted September 27, 2005 (edited) Although AutoIt documentation is clear as crystal,i'll tell you a hint... A 17" monitor has a diagonal of 17x2.54 = 43.18cm... The aspect ratio is 4:3 , right? So according to Pythagoras : (43.18)^2 = (4x)^2 + (3x)^2 => 1861.54 = 25x^2 => x^2 = 1861.54/25 => x= 8.63 . The dimension will be then Horizontal: 4 * 8.63 = 34.5 and Vertical : 3 * 8.63 = 25.8 . If your resolution is 1024x768 then in Horizontal there are 1024/34.5 pixels/cm and in vertical 768/25.8 pixels/cm . That means ~30pixels/cm for both dimensions.... If you want to have a square cm on your screen with its top left corner on 512,384 then you will have to add this in your script (if it is a 17" monitor @ 1024x768): PixelChecksum ( 512,384,542,414) I hope that helped a bit..... Of course there is an easier way to use AutoIt Window Info and use the coordinates it shows by "drawing" an imaginary rectangle and write down the numbers.... But I just had to show off... C ya Edited September 27, 2005 by hgeras Useful information about COM/Objects referenceMy Scripts:PapDefragNvidia Temperature Logger V3.0 with graph analyzerAutoiIt Update Checker And Downloader V1.0ArrayPush UDF
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