mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2006
Posts: 64
S
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2006
Posts: 64
Any ideas how to get the color value of a specific pixel on the screen (non mIRC window, so $getdot won't do the trick)? smile

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
all i could suggest is scripting a screen dump, saving to a temp.bmp, loading that in a custom window and grabbing your pixel from there...(I'm not even going to attempt the logarithm for finding a specific pixel)...then .remove temp.bmp

i know its a bit of a roundabout way to go but it's all i can think of.

btk


billythekid
Joined: Jan 2006
Posts: 64
S
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2006
Posts: 64
I was thinking about this, but saving to bmp may change the color value of some pixels, because of the quality of the bmp file format... I need the exact color value not +/- 10 of 16 000 000

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
BMP files dont go off by +/-10 there 24 or 32 bit what ever the image is you got (8 bit if your in some old 256 color screen mode tho)

Joined: Jan 2006
Posts: 64
S
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2006
Posts: 64
Aham... right... but what I need is a script which will be executed each second, so therefor it must be fast and simple to compile by mIRC, so that my CPU stays cool... the screenshot idea is a possibility... but it would be very inefficient to generate a map of 1028x1024 pixels to get the color value of one single pixel on the screen, in order to analyse the movement of an object in another program... frown

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
i dont know if this is any good, but if a custom window were opened, maximised on the desktop with a transparency of 100% would the pixel colours be available then?

btk


billythekid
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
mahahahahaha I doubt it! But Double points for the idea!

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Well i never was the one who said it would be fast smile
Also didnt realize you were after realtime tracking of soemthng small,
I thought it was more a need to pull the pixel colors of another screen off, like u wanted to build the whole picture (or part of) up in something else, then it would have been fine, just screen cap, drop the whole bmp in a picwin and cut out the chunk u want.

Im sure some of the dll writers around could bang up soemthing that well access the screen x,y direct and return a pixel color, but im not one of them,

(/me is to lazy to sort out why .net wouldnt work with mirc when i tried, and never tried again)


Link Copied to Clipboard