screenmouseloc not cutting it
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: screenmouseloc not cutting it
yeah. my question of how to find a color at a specific coordinate is a beginners question. the rest of the code is entry level coding but all put together to make something complex
Re: screenmouseloc not cutting it
I agree with the first part for sure, but after watching (all) of those videos, I suspect that the phrase 'entry level' has changed a bit over the decades that have passed since I started writing code 
But I'll take your word that it is what passes for entry level these days, and will stop derailing your thread

But I'll take your word that it is what passes for entry level these days, and will stop derailing your thread


Re: screenmouseloc not cutting it
im currently just using simple loops and arrays in my code which is simple code even if a bit long
Re: screenmouseloc not cutting it
Back to the question at hand, I know your using 6.6.2, but I wonder if there isn't something similar to this (I believe Lc 8 dictionary entry) -
I didn't see anything close, but you never know.GetPixelDataOfCanvas (operator)
Get the current contents of a canvas as raw pixel data
Syntax
the pixel data of Canvas
----Description
Capture the current contents of the Canvas as raw pixel data in RGBA
format with 8 bits per color component, i.e. 32 bits or 4 bytes per
pixel.

Re: screenmouseloc not cutting it
nope. no getpixeldata. was hoping the foreground color thing might work but it didnt
Re: screenmouseloc not cutting it
Ah well, then mouseColor (or one of Jacque's solutions) looks like the way it is for us 


Re: screenmouseloc not cutting it
yes. im currently using the method of moving the mouse location then testing the pixel at the location then returning the mouse to its start. i foresee it having to test a couple hundred locations or more.
Re: screenmouseloc not cutting it
Are you still seeing the 'jitter' you were mentioning earlier?... i can still see the pointer buz around the screen. should i just hide the pointer then unhide it?

Re: screenmouseloc not cutting it
the jitter in the position of the mouse if because its going to all of the locations (currently 8 because im only currently testing the neighbours around the start point). But my trick was to set the cursor to none then set it back to arrow when its done.
Re: screenmouseloc not cutting it
Yes, I see now. I put the same 3 colors, a list box, and a repeat loop for 100x visiting each color. Oddly, even though it was looping through the locations of the 3 colors, without hiding the mouse arrow, it would actually show up outside of the stack by quite some distance, regardless using the globalLoc and the localLoc, or just location. Unfortunately, it would be tough to get a screen shot of that aspect of it.
Hiding it gave a slightly unsightly brief disappearance of the cursor itself, however that might be (read that most likely is) because of the inefficiency of my testing method, and the fact that it does run 100x.

Hiding it gave a slightly unsightly brief disappearance of the cursor itself, however that might be (read that most likely is) because of the inefficiency of my testing method, and the fact that it does run 100x.


Re: screenmouseloc not cutting it
You know this question really must have bugged me, because I was still wondering why you would have to go to all this rigamarole to get the color of a square
Mind you Da_Elf, I don't know if this will suit your need or not, or maybe you are satisfied with where the solution is now, but I hope so
Ok, remember the little demo picture of mine, where I made 3 graphic objects of different colors? For those of us with 'all-the-timers', here is the new 'improved' routine picture

I think the code is pretty much as simple as I can make it, I remember you were talking about a 'path of colored squares', so I think this works fairly well, fairly quick, and without needing to know where you are since the mouse isn't involved at all (other than clicking).

Mind you Da_Elf, I don't know if this will suit your need or not, or maybe you are satisfied with where the solution is now, but I hope so

Ok, remember the little demo picture of mine, where I made 3 graphic objects of different colors? For those of us with 'all-the-timers', here is the new 'improved' routine picture

I think the code is pretty much as simple as I can make it, I remember you were talking about a 'path of colored squares', so I think this works fairly well, fairly quick, and without needing to know where you are since the mouse isn't involved at all (other than clicking).

Re: screenmouseloc not cutting it
i need to test a black and white image that would be an indication of walkable areas and non-walkable areas. thats why im testing the color of an area. i will put the walkable areas into 1 list and the rest in another list. This way i know what areas i can proceed to test next