Re: Reverse 'pixelcoloring' and total amount of colors

2018-03-06 Thread James At The Hale via use-livecode
Just wanted to delete all the appended quotes! ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Reverse 'pixelcoloring' and total amount of colors

2018-03-06 Thread William de Smet via use-livecode
Hi Mike, The 'put into field instructions2' was in there to check what was going on. It works now the way I like it. Thanks again! greetings, William 2018-03-05 21:37 GMT+01:00 Mike Bonner via use-livecode < use-livecode@lists.runrev.com>: > Hmm. In this case, you know the condition of

Re: Reverse 'pixelcoloring' and total amount of colors

2018-03-05 Thread Mike Bonner via use-livecode
Hmm. In this case, you know the condition of failure, so if everything else is working as you need, i'd just check for that condition and act accordingly.. if char 1 of the last item of tInstructions is "W" and the number of items of tInstructions > 1 then.. Do you want tInstructions to be empty

Re: Reverse 'pixelcoloring' and total amount of colors

2018-03-05 Thread William de Smet via use-livecode
Thanks Mike that helped a lot! I extended your script with this: repeat with x= 1 to the number of items of tInstructions put char 2 of item x of tInstructions into tChar put "v" into tNaam set the label of btn tNaam to tChar set the showname of btn tNaam to true put char 1 of item x of

Re: Reverse 'pixelcoloring' and total amount of colors

2018-03-05 Thread Mike Bonner via use-livecode
Ah, I understand better now. Something like this should work. Its just a quicky, no time to really test before my doc appointment. on mouseup local tInstructions -- gotta have this cause a non declared isn't seen as empty repeat with i = 1 to 4 switch case the backgroundcolor

Re: Reverse 'pixelcoloring' and total amount of colors

2018-03-05 Thread William de Smet via use-livecode
Hi Mike, Thanks for your answer! The exercises are actually binary exercises but the children don't know. All they know is a 'puzzle' to solve with pixelcoloring. Funny I can solve it this way :-) Still figuring how to do it because the children instruction is not just binary writing as you

Re: Reverse 'pixelcoloring' and total amount of colors

2018-03-05 Thread Mike Bonner via use-livecode
If you want to know which "pixel" is on in a row, you could treat them as binary bits. Farthest right in a row is bit 1, next to the left is bit 2.. So your buttons could be 0 0 1 0 1 0 1 64 32 16 8 4 2 1 for a total of 21 which would

Re: Reverse 'pixelcoloring' and total amount of colors

2018-03-05 Thread William de Smet via use-livecode
Thanks for your reply! Your app is the same as what I did before and that's quit easy to do. For now I want to build instruction cards based upon a pixel drawing. First you makel your drawing and then it gives you your instruction card. The other way around. My question is how to do that?

Re: Reverse 'pixelcoloring' and total amount of colors

2018-03-05 Thread Jose Enrique Montero via use-livecode
I made a similar application, you can look, https://play.google.com/store/apps/details?id=com.kaikuse.babygrid=es best regards 2018-03-05 3:55 GMT-04:00 William de Smet via use-livecode < use-livecode@lists.runrev.com>: > Hi there, > > This is quite a challenge for me. > I an trying to build a