elitesoldier Posted January 28, 2004 Share Posted January 28, 2004 anyone know how to make a program to get the cordinates of a pixel? i konw u can use the one with that comes with autoit but i need to get the cordinates of a pixel while im in game...so it doesn't work : / I need it for a bot im making so the cordinates must be percise. I wanted the program to just save the pixel cordinate of where the mouse is pointing to or produce a pop up of what that cordinate is when i press a hotkey. Anyone know any progs that do this or how i could make a script do this in auto it. Thx Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 28, 2004 Administrators Share Posted January 28, 2004 You can use the MouseGetPos and PixelGetColor functions. You can use these to write a script that pauses for a while and then makes a note of where your mouse pointer currently is and gets the pixel colour in the background. Here is a script that sleeps until you press the hotkey ctrl+alt+p - it then reads the pixel at the current mouse position and pops up a message box. If it doesn't do what you want it should at least get you pointed in the right direction: ; Setup our hotkey HotKeySet("^!p", "GetPixel") ; Set up a low-CPU use infinite loop While 1 Sleep(1000) WEnd Func GetPixel() ; Get the current mouse pointer co-ords $pos = MouseGetPos() ; Get the colour of the pixel currently under the pointer $col = PixelGetColor($pos[0], $pos[1]) ; Show the messagebox (may have to quit the game to see it) MsgBox(4096, "Pixel under mouse was:", $col & " (0x" & Hex($col, 6) & ")" ) ; Completely exit the script Exit EndFunc Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
elitesoldier Posted January 29, 2004 Author Share Posted January 29, 2004 (edited) thx alot!! works like a charm Edited January 29, 2004 by elitesoldier Link to comment Share on other sites More sharing options...
Josbe Posted January 29, 2004 Share Posted January 29, 2004 Probably your AutoIt3 version is older. This appears up to v3.0.85Or maybe you are using AutoItv2.Check it! AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
elitesoldier Posted January 29, 2004 Author Share Posted January 29, 2004 Probably your AutoIt3 version is older. This appears up to v3.0.85Or maybe you are using AutoItv2.yes thats what it was, i just downloaded autoit again and now it has those functions. 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