ken82m Posted October 7, 2008 Share Posted October 7, 2008 (edited) I'm reading screen coords from an ini file. They are put their by another script that asks a user to click on certain items. To verify they are valid I was just going to do a PixelGetColor and look for a -1 if they were invalid. However using the coords X=9000 Y=9000 The result is 664682. However my screen resolution is 1024X768. What am I doing wrong? Thanks, Kenny $DiscTypeX=9000 $DiscTypeY=9000 MsgBox(4096,"Color", PixelGetColor ($DiscTypeX, $DiscTypeY)) Edited October 10, 2008 by ken82m "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." Link to comment Share on other sites More sharing options...
spudw2k Posted October 7, 2008 Share Posted October 7, 2008 (edited) if you don't need to work with the color of a pixel, you can check the co-ords against the screen size. $DiscTypeX=9000 $DiscTypeY=9000 MsgBox(4096,"Color", PixelGetColor ($DiscTypeX, $DiscTypeY)) MsgBox(4096,"Is Inside?",_IsInsideScreen($DiscTypeX,$DiscTypeY)) Func _IsInsideScreen($x,$y,$screenX = 0,$screenY = 0) If $screenX = 0 Then $screenX = DllCall('user32.dll', 'int', 'GetSystemMetrics', 'int', 78) If $screenY = 0 Then $screenY = DllCall('user32.dll', 'int', 'GetSystemMetrics', 'int', 79) If $x > $screenX[0] Or $x < 0 Or $y > $screenY[0] Or $y < 0 Then Return 0 Return 1 EndFunc Edited October 7, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
ken82m Posted October 7, 2008 Author Share Posted October 7, 2008 Perfect, yeah I just want to make sure it's a coordinate the mouse can actually get to so the macro doesn't go nuts lol Thanks man Kenny "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains." 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