Re: ColorAtScreenLoc Function

2014-01-22 Thread Mark Schonewille
Hi Al, Are you saying that the exported PNG is of the correct size, e.g. 5x5 pixels? I have to try that again. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use

Re: ColorAtScreenLoc Function

2014-01-21 Thread Alejandro Tejada
Hi Mark, Mark Schonewille-3 wrote > [snip] > Unfortunately, it seems impossible to export snapshots smaller > than 32x32 pixels. Adding 31 pixels to the height and width of the first > pixel makes a square of 32x32 pixels and that works. Interesting, because in LiveCode 6.5.1, importing a snap

Re: ColorAtScreenLoc Function

2014-01-21 Thread Ray
Ahh, I understand. I didn't realize there was an issue exporting snapshots < 32X32. And Jackie, thanks. Very clean solution. I just tried it and it works very well. Ray On 1/21/2014 4:28 PM, Mark Schonewille wrote: Hi Ray, I wanted to keep the amount of data to be dealt with as small as

Re: ColorAtScreenLoc Function

2014-01-21 Thread Mark Schonewille
Hi Ray, I wanted to keep the amount of data to be dealt with as small as possible. The smaller the amount of data, the faster the function, I'd assume. Unfortunately, it seems impossible to export snapshots smaller than 32x32 pixels. Adding 31 pixels to the height and width of the first pixel

Re: ColorAtScreenLoc Function

2014-01-21 Thread J. Landman Gay
Here's another way: on getPixelColor pPt put the screenmouseloc into tOldLoc put (item 1 of pPt) + (the left of this stack) into tloc put (item 2 of pPt) + (the top of this stack) into item 2 of tloc set the screenmouseloc to tloc put the mousecolor into tColor set the screenmouseloc

Re: ColorAtScreenLoc Function

2014-01-21 Thread Ray
Mark I'm having fun with this code. Just one question; why add 31 pixels as opposed to another number of pixels? On 1/21/2014 3:36 PM, Mark Schonewille wrote: Hi Ray, Now I'm thinking, why did I write a function for the screenLoc only? So, here's a general solution. // usage: pointColor("1

Re: ColorAtScreenLoc Function

2014-01-21 Thread Mark Schonewille
Hi Ray, Now I'm thinking, why did I write a function for the screenLoc only? So, here's a general solution. // usage: pointColor("100,200") or // pointColor(100,200) or e.g. // pointColor(the screenLoc) function pointColor thePoint if the paramCount is 2 then put param(1),param(2) int

Re: ColorAtScreenLoc Function

2014-01-21 Thread Ray
Mark - I believe this is everything I need. Thanks! I especially like you usage of the templateImage which keeps everything easy to work with and no cleanup needed. Ray On 1/21/2014 1:32 PM, Mark Schonewille wrote: Hi Ray, This function doesn't involve moving the mouse cursor. function sc

Re: ColorAtScreenLoc Function

2014-01-21 Thread Ray
Thanks Richmond - I believe this requires a mouse click, though, which I'd like to avoid if I can. On 1/21/2014 1:30 PM, Richmond wrote: http://forums.runrev.com/viewtopic.php?f=5&t=18796 Asks for a screen location in 2 comma delimited numbers and the returns the colour at that location on yo

Re: ColorAtScreenLoc Function

2014-01-21 Thread Mark Schonewille
Hi Ray, This function doesn't involve moving the mouse cursor. function screenlocColor put the screenloc into myLoc add 31 to item 1 of myLoc add 31 to item 2 of myLoc put (the screenLoc),myLoc into myRect export snapshot from rectangle myRect to myPixels as PNG set the text of

Re: ColorAtScreenLoc Function

2014-01-21 Thread Richmond
http://forums.runrev.com/viewtopic.php?f=5&t=18796 Asks for a screen location in 2 comma delimited numbers and the returns the colour at that location on your monitor. Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visi

Re: ColorAtScreenLoc Function

2014-01-21 Thread Ray
Hey Klaus, that actually works quite well and it's a lot easier than wrestling with the imageData of a snapshot. I wonder why the screenMouseLoc is not mentioned as a related item in the documentation for the mouseLoc? Thanks, Ray On 1/21/2014 12:41 PM, Klaus major-k wrote: Hi Ray, Am 21

Re: ColorAtScreenLoc Function

2014-01-21 Thread Klaus major-k
Hi Ray, Am 21.01.2014 um 18:28 schrieb Ray : > Anybody know of a function which returns the color of the screen at a given > location? Simply pass it a point and get the color of that pixel, kind of > like a combination of the mouseColor function and the controlAtScreenLoc > function. I'd be