Re: Get URL anomaly

2018-03-05 Thread Charles Warwick via use-livecode
Hi Graham,


> On 5 Mar 2018, at 10:56 pm, Graham Samuel via use-livecode 
>  wrote:
> 
> As in some of my previous mails, I’m talking about having to retrieve a tiny 
> text file from a server (and later put a modified version of it back, but 
> let’s get one problem solved at a time) The whole thing is just a few lines 
> of code:
> 
> constant myFileOnTheServer = "www.myserver.comm/mytextfile.txt”
> 
> put “http://“ & myFileOnTheServer into t1
> 
> get URL t1
> 
> if the result is empty then
> 
>do stuff with ‘it’, where the text file is placed
> 
>   …

I would recommend using:

put URL t1 into tData

The contents of ‘it’ can be changed by other commands, so if you are having 
issues in a more complex app, maybe something else is overwriting that value?

Cheers,

Charles

___
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: [Completely OT] Withdrawal symptoms from Slashdot

2018-03-05 Thread Phil Davis via use-livecode

Or this:

https://alternativeto.net/software/slashdot/

Phil Davis


On 3/3/18 6:37 PM, Rick Harrison via use-livecode wrote:

Hi Alex,

Try..

https://news360.com 

You can choose a technical focus too.

Enjoy!

Rick


On Mar 3, 2018, at 7:09 PM, Alex Tweedly via use-livecode 
 wrote:

Completely off topic, but I need help ;-)

For many years now my standard "I have 30 seconds (or minutes) to fill in, what's 
happening in the world" web site has been slashdot, but it seems to be completely 
off the air for now.

I'm looking for suggestions for alternates that are worth using while waiting 
for a build, or just to give me some interesting. The less video, the better :-)

Thanks

Alex.


___
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

___
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



--
Phil Davis


___
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: Rotating PNG images

2018-03-05 Thread Jim Lambert via use-livecode
With the added WAIT this is a bit more fun to look at.
And it checks for angles > 32767.
You get an error if you set the angle of an image to greater than 32767.

local ang

on spin
   repeat forever
  add 13 to ang
  if ang > 32767 then 
 beep
 put 0 into ang
  end if
  set the angle of image 1 to ang
  if the commandKey is down then 
 --set the angle of image 1 to 0
 exit spin
  end if
  wait 0 ticks
   end repeat
end spin

Again this illustrates that setting the angle of an image does not distort the 
image, whereas rotating an image can distort the image.

Jim Lambert
___
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


Trace_to_SVG

2018-03-05 Thread hh via use-livecode
Just uploaded "Trace_to_SVG" (MIT license from Potrace).

The stack uses Potrace (by P. Seliger, the "lite" JavaScript version) in a
browser widget with your input. It runs using LC 8/9 on Mac/ Win 7+10/ Ubuntu.
I changed the JavaScript a little bit to use better the power of the "LC-GUI".

You input an image (especially your own painting) or an image from a group or
an image from a text field. This is traced to an SVG path using curves with a
selectable level of smoothing.

The image is translated to "black and white" for tracing, you can set weights
for building the preparing grayLevel and set the threshold value. Transparency
is supported.

The generated SVG is displayed in a grouped "SVG Icon" widget and
(if installed) in a grouped "SVG_Text" widget, ready for being copied.

The size of the generated SVG is in between 10% and 110% of the input image!

Download "Trace_to_SVG" from "Sample Stacks"
(or http://livecodeshare.runrev.com/stack/869).


___
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: Rotating PNG images

2018-03-05 Thread hh via use-livecode
> Richmond M. wrote:
> There's no "instead", I set the angle on PNG images and they deteriorate.

Did you already try hhMockUp (from "sample stacks")?
I just tried with the LCC 1024x1024 logo.
Simply use the images menu there to import and then select it from that menu.

Works fine:
skewing, scaling, rotating all as single actions or (use check "All") in one
single all-in-one action.

Or even perspective transforms.

That's what LiveCode can do ...

(and Trace_to_SVG is now also available).

___
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-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 in the case of 7 white squares?  And
W7 to be put into field instructions2?

Either way..
if there is only 1 item in tInstructions, and char 1 of tInstructions is
"W" then
   put whatever into field "instructions2" that you need
   put empty into tInstructions
else
   put whatever into field "instructions2" that you need
   delete item -1 of tInstructions
end if

Not sure what end results you want, or how if fails, but maybe something ^
there will help.

On Mon, Mar 5, 2018 at 12:13 PM, William de Smet via use-livecode <
use-livecode@lists.runrev.com> wrote:

> 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 tInstructions into tLetter
> if tLetter is "W"
> then
> set the backgroundcolor of btn tNaam to 255,255,255
> else
> set the backgroundcolor of btn tNaam to 90,200,250
> end if
> end repeat
> ---
>
> Now it almost looks like this:
> http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
>
> One thing left:
> If the last button(s) is/are white it doesn't have to be shown on the
> instruction.
> So how do I leave it out?
> When I add this it almost works:
> --
> if char 1 of the last item of tInstructions is "W"
> then
> put the last item of tInstructions into fld "instructions2"
> delete the last item of tInstructions
> --
> This fails if the last item is the first and only item (when there are 7
> white buttons).
> Any thoughts on this?
>
>
>
> greetings,
>
> William
>
>
>
> 2018-03-05 17:41 GMT+01:00 Mike Bonner via use-livecode <
> use-livecode@lists.runrev.com>:
>
> > 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 of button ("b" & i) is "255,255,255"
> > if tInstructions is empty then put "W0" into tInstructions
> > if char -2 of tInstructions is not "W" then put comma & "W0"
> > after tInstructions
> > add 1 to char -1 of tInstructions
> > break
> >  case the backgroundcolor of button ("b" & i) is "0,0,255"
> > if tInstructions is empty then put "B0" into tInstructions
> > if char -2 of tInstructions is not "B" then put comma & "B0"
> > after tInstructions
> > add 1 to char -1 of tInstructions
> > break
> >  default
> > if tInstructions is empty then
> >put "E" into tInstructions
> > else
> >put comma & "E" after tInstructions
> > end if
> >   end switch
> >end repeat
> >
> >put tInstructions
> > end mouseup
> >
> > On Mon, Mar 5, 2018 at 8:28 AM, William de Smet via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> > > 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 explained it.
> > >
> > > Did you see my picture?
> > > http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
> > >
> > >
> > > greetings.
> > >
> > > William
> > >
> > >
> > >
> > > 2018-03-05 16:10 GMT+01:00 Mike Bonner via use-livecode <
> > > use-livecode@lists.runrev.com>:
> > >
> > > > 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 then tell you the "bit patteren" of
> your
> > > row.
> > > >
> > > > Not fully awake yet, so if there is anything wrong with my example,
> > > > hopefully it still makes sense.
> > > >
> > > > On Mon, Mar 5, 2018 at 5:50 AM, William de Smet via use-livecode <
> > > > use-livecode@lists.runrev.com> wrote:
> > > >
> > > > > 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 

Re: LC server and fonts

2018-03-05 Thread Mike Bonner via use-livecode
Hmm. Not sure what to do about loading a fontfile then.  Out of curiosity,
what is the error?

On Mon, Mar 5, 2018 at 11:39 AM, jbv via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Mike,
> Thanks for your reply.
>
> Yes, I managed to set the textfont of a btn or fld to one of the fonts
> available in the fontnames, but I still can't figure how to use any
> other ttf font...
> load font file "nameofyourfont.ttf" -> returns an error
> I tried load URL "nameofyourfont.ttf", it works, but then the textfont
> property isn't updated...
>
> On Mon, March 5, 2018 3:59 pm, Mike Bonner via use-livecode wrote:
> > With on-rev, I put up this script..
> >
> >
> >  > create button "mybtn"
> >
> > repeat for each line tLIne in the fontnames -- will make 1 png per font
> >
> > set the label of btn "mybtn" to tLine set the textfont of button "mybtn"
> > to tLine set the width of button "mybtn" to the formattedwidth of button
> > "mybtn" + 5
> >
> >
> > export snapshot from button "mybtn" to file (tLine & ".png") as PNG
> >
> > put the textfont of button "mybtn" && " > & quote & ">" & cr
> > end repeat ?>
> >
> >
> > And it works fine, with the exception of fonts with a - in the name.  All
> >  of them are Hershey fonts, so not sure if its the font family that is
> > broken, or the dashes causing the issue.
> >
> > If you have a ttf font file to use, you can probably put it on your
> > server next to your script and: load font file "nameofyourfont.ttf" and
> then
> > set the textfont to "nameofyourfont" and it will likely work.
> >
> > To see my script in action, check here:
> > http://guidezone.info/fonttest.lc
> >
> >
> > On Sun, Mar 4, 2018 at 8:21 AM, Warren Samples via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> On 03/02/2018 04:14 AM, jbv via use-livecode wrote:
> >>
> >>
> >>> Hello list
> >>> How can I load ttf font files with LC server, at least version 7.1
> >>> available on my on-rev account ? Neither "revFontLoad" nor "start using
> >>> font file" seem to work... And the list of available fonts returned by
> >>> "the fontNames" is quite
> >>> limited...
> >>>
> >>> Thanks in advance.
> >>> jbv
> >>>
> >>>
> >>>
> >> Does on-rev run on Linux? If you create a directory called '.fonts'
> >> under your user name and install the fonts you want to use in your
> >> images in that directory, LiveCode will find them.
> >>
> >> A quick test shows this to be true using LC Server 8.1.4, but you may
> >> have to do some experimenting to get them working in a script accessed
> >> through your web server. Executing a script to show the fontnames works
> >> from the command line but without having done any real investigating, I
> >> have to admit it's not working when accessed through my server. This
> >> isn't an on-rev nor an Apache server so ymmv. If you decide to go the
> >> standalone route, you should be able to install your fonts this way to
> >> use them in the standalone.
> >>
> >> Good luck!
> >>
> >>
> >> Warren
> >>
> >>
> >>
> >> ___
> >> 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
> >>
> >>
> > ___
> > 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
> >
> >
>
>
>
> ___
> 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
>
___
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: Rotating PNG images

2018-03-05 Thread Richmond Mathewson via use-livecode

No.

All fairly pedestrian stuff.


On 5/3/2018 9:43 pm, Keith Martin via use-livecode wrote:

On 5 Mar 2018, at 18:34, Richmond Mathewson via use-livecode wrote:


I set the angle on PNG images and they deteriorate.


For clarity, are you setting the angle to something other than 
90/180/270 degrees?


k

___
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


___
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: Rotating PNG images

2018-03-05 Thread Jim Lambert via use-livecode
Richmond wrote:
> LiveCode is incapable of rotating anything other than SVG images
> without a bad case of the "jaggies".

RichardG wrote:
> have you tried setting the angle property instead?

Richmond wrote:
> I set the angle on PNG images and they deteriorate.



I find that

rotate image 1 by 13

will often produce jaggies even if resize quality is best. 
And the distortion increases with every iteration.

However, if find that

set the angle of image 1 to 13

never deteriorates the image.

You can do the following all the livelong day without any jaggies in the image.

local ang

on spin
   repeat forever
  add 13 to ang
  set the angle of image 1 to ang
  if the commandKey is down then 
 set the angle of image 1 to 0
 exit spin
  end if
   end repeat
end spin

Jim Lambert

___
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: Rotating PNG images

2018-03-05 Thread Keith Martin via use-livecode

On 5 Mar 2018, at 18:34, Richmond Mathewson via use-livecode wrote:


I set the angle on PNG images and they deteriorate.


For clarity, are you setting the angle to something other than 
90/180/270 degrees?


k

___
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-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 tInstructions into tLetter
if tLetter is "W"
then
set the backgroundcolor of btn tNaam to 255,255,255
else
set the backgroundcolor of btn tNaam to 90,200,250
end if
end repeat
---

Now it almost looks like this:
http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg

One thing left:
If the last button(s) is/are white it doesn't have to be shown on the
instruction.
So how do I leave it out?
When I add this it almost works:
--
if char 1 of the last item of tInstructions is "W"
then
put the last item of tInstructions into fld "instructions2"
delete the last item of tInstructions
--
This fails if the last item is the first and only item (when there are 7
white buttons).
Any thoughts on this?



greetings,

William



2018-03-05 17:41 GMT+01:00 Mike Bonner via use-livecode <
use-livecode@lists.runrev.com>:

> 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 of button ("b" & i) is "255,255,255"
> if tInstructions is empty then put "W0" into tInstructions
> if char -2 of tInstructions is not "W" then put comma & "W0"
> after tInstructions
> add 1 to char -1 of tInstructions
> break
>  case the backgroundcolor of button ("b" & i) is "0,0,255"
> if tInstructions is empty then put "B0" into tInstructions
> if char -2 of tInstructions is not "B" then put comma & "B0"
> after tInstructions
> add 1 to char -1 of tInstructions
> break
>  default
> if tInstructions is empty then
>put "E" into tInstructions
> else
>put comma & "E" after tInstructions
> end if
>   end switch
>end repeat
>
>put tInstructions
> end mouseup
>
> On Mon, Mar 5, 2018 at 8:28 AM, William de Smet via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > 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 explained it.
> >
> > Did you see my picture?
> > http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
> >
> >
> > greetings.
> >
> > William
> >
> >
> >
> > 2018-03-05 16:10 GMT+01:00 Mike Bonner via use-livecode <
> > use-livecode@lists.runrev.com>:
> >
> > > 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 then tell you the "bit patteren" of your
> > row.
> > >
> > > Not fully awake yet, so if there is anything wrong with my example,
> > > hopefully it still makes sense.
> > >
> > > On Mon, Mar 5, 2018 at 5:50 AM, William de Smet via use-livecode <
> > > use-livecode@lists.runrev.com> wrote:
> > >
> > > > 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?
> > > >
> > > >
> > > >
> > > > groeten,
> > > >
> > > > William
> > > >
> > > >
> > > >
> > > > 2018-03-05 13:40 GMT+01:00 Jose Enrique Montero via use-livecode <
> > > > use-livecode@lists.runrev.com>:
> > > >
> > > > > 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 template in which users (small children)
> can
> > > > > > 'pixeldraw' something and based on the drawing the instruction
> will
> > > be
> > > > > > made.
> > > > > > The instruction is needed for other children to make the pixel
> > > drawing.
> > > > > > The instruction is quite special.
> > > > > >
> > > > > > The template is a square with 49 buttons (7x7) for the coloring
> and

Re: LC server and fonts

2018-03-05 Thread jbv via use-livecode
Hi Mike,
Thanks for your reply.

Yes, I managed to set the textfont of a btn or fld to one of the fonts
available in the fontnames, but I still can't figure how to use any
other ttf font...
load font file "nameofyourfont.ttf" -> returns an error
I tried load URL "nameofyourfont.ttf", it works, but then the textfont
property isn't updated...

On Mon, March 5, 2018 3:59 pm, Mike Bonner via use-livecode wrote:
> With on-rev, I put up this script..
>
>
>  create button "mybtn"
>
> repeat for each line tLIne in the fontnames -- will make 1 png per font
>
> set the label of btn "mybtn" to tLine set the textfont of button "mybtn"
> to tLine set the width of button "mybtn" to the formattedwidth of button
> "mybtn" + 5
>
>
> export snapshot from button "mybtn" to file (tLine & ".png") as PNG
>
> put the textfont of button "mybtn" && " & quote & ">" & cr
> end repeat ?>
>
>
> And it works fine, with the exception of fonts with a - in the name.  All
>  of them are Hershey fonts, so not sure if its the font family that is
> broken, or the dashes causing the issue.
>
> If you have a ttf font file to use, you can probably put it on your
> server next to your script and: load font file "nameofyourfont.ttf" and
then
> set the textfont to "nameofyourfont" and it will likely work.
>
> To see my script in action, check here:
> http://guidezone.info/fonttest.lc
>
>
> On Sun, Mar 4, 2018 at 8:21 AM, Warren Samples via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> On 03/02/2018 04:14 AM, jbv via use-livecode wrote:
>>
>>
>>> Hello list
>>> How can I load ttf font files with LC server, at least version 7.1
>>> available on my on-rev account ? Neither "revFontLoad" nor "start using
>>> font file" seem to work... And the list of available fonts returned by
>>> "the fontNames" is quite
>>> limited...
>>>
>>> Thanks in advance.
>>> jbv
>>>
>>>
>>>
>> Does on-rev run on Linux? If you create a directory called '.fonts'
>> under your user name and install the fonts you want to use in your
>> images in that directory, LiveCode will find them.
>>
>> A quick test shows this to be true using LC Server 8.1.4, but you may
>> have to do some experimenting to get them working in a script accessed
>> through your web server. Executing a script to show the fontnames works
>> from the command line but without having done any real investigating, I
>> have to admit it's not working when accessed through my server. This
>> isn't an on-rev nor an Apache server so ymmv. If you decide to go the
>> standalone route, you should be able to install your fonts this way to
>> use them in the standalone.
>>
>> Good luck!
>>
>>
>> Warren
>>
>>
>>
>> ___
>> 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
>>
>>
> ___
> 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
>
>



___
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: Rotating PNG images

2018-03-05 Thread Richmond Mathewson via use-livecode



On 5/3/2018 6:33 pm, Richard Gaskin via use-livecode wrote:
When testing here on Ubuntu 14.04 images rotated at 90, 180, or 270 
look very good.


How can I reproduce what you're seeing?

Also, have you tried setting the angle property instead?



There's no "instead", I set the angle on PNG images and they deteriorate.

Richmond.

___
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: Rotating PNG images

2018-03-05 Thread Richmond Mathewson via use-livecode

Erm . . .

Yes: I trace the monochrome images in Inkscape
and then import them into SVG widgets using my homegrown stack.

On 5/3/2018 6:30 pm, hh via use-livecode wrote:

Richmond M. wrote:
Not much.
Luckily I am building images where the part that needs
rotating is monochrome so that can
be rendered as an SVG and imported into a widget.
This is, however, quite beside the point . . .
The inability of LiveCode to do something that nearly
every other program seems to manage "easily".

An image can't be rendered as an SVG. Or do you mean that it
is "traced" to an SVG? This is non-trivial (i.e. not "Not much").
The "nearly every other programs" (which else than Inkscape and
Gimp?) can't do it "easily", they all use "Potrace".

That can LC also easily do. I have already implemented it.


Aha! And is that publically available?


p.s. Are you really looking for PNGtoSVG in order to rotate an image?


No, I'm not.

Richmond.


___
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: Rotating PNG images

2018-03-05 Thread Richard Gaskin via use-livecode
When testing here on Ubuntu 14.04 images rotated at 90, 180, or 270 look 
very good.


How can I reproduce what you're seeing?

Also, have you tried setting the angle property instead?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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: [Completely OT] Withdrawal symptoms from Slashdot

2018-03-05 Thread Mark Wieder via use-livecode

On 03/03/2018 08:16 PM, Rodney Somerstein via use-livecode wrote:
Slashdot is definitely still there. Make sure you are going to 
https://slashdot.org . I suppose they may have been having a problem the 
last time you tried the site, but it is definitely up and running right 
now.


Slashdot was having some hiccups transferring to new servers.
They seem to have recovered nicely now.

--
 Mark Wieder
 ahsoftw...@gmail.com

___
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-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 of button ("b" & i) is "255,255,255"
if tInstructions is empty then put "W0" into tInstructions
if char -2 of tInstructions is not "W" then put comma & "W0"
after tInstructions
add 1 to char -1 of tInstructions
break
 case the backgroundcolor of button ("b" & i) is "0,0,255"
if tInstructions is empty then put "B0" into tInstructions
if char -2 of tInstructions is not "B" then put comma & "B0"
after tInstructions
add 1 to char -1 of tInstructions
break
 default
if tInstructions is empty then
   put "E" into tInstructions
else
   put comma & "E" after tInstructions
end if
  end switch
   end repeat

   put tInstructions
end mouseup

On Mon, Mar 5, 2018 at 8:28 AM, William de Smet via use-livecode <
use-livecode@lists.runrev.com> wrote:

> 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 explained it.
>
> Did you see my picture?
> http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
>
>
> greetings.
>
> William
>
>
>
> 2018-03-05 16:10 GMT+01:00 Mike Bonner via use-livecode <
> use-livecode@lists.runrev.com>:
>
> > 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 then tell you the "bit patteren" of your
> row.
> >
> > Not fully awake yet, so if there is anything wrong with my example,
> > hopefully it still makes sense.
> >
> > On Mon, Mar 5, 2018 at 5:50 AM, William de Smet via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> > > 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?
> > >
> > >
> > >
> > > groeten,
> > >
> > > William
> > >
> > >
> > >
> > > 2018-03-05 13:40 GMT+01:00 Jose Enrique Montero via use-livecode <
> > > use-livecode@lists.runrev.com>:
> > >
> > > > 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 template in which users (small children) can
> > > > > 'pixeldraw' something and based on the drawing the instruction will
> > be
> > > > > made.
> > > > > The instruction is needed for other children to make the pixel
> > drawing.
> > > > > The instruction is quite special.
> > > > >
> > > > > The template is a square with 49 buttons (7x7) for the coloring and
> > 49
> > > > > fields for the instruction.
> > > > > The coloring of the buttons is no problem. The 'reverse' coloring
> is
> > > the
> > > > > problem.
> > > > > I can get the amount of a colors in a row (5 x white and 2 x blue)
> > but
> > > > how
> > > > > do I determine on which place (in which buttons) these colors are.
> > > > > The first row is: 3 white - 1 blue - 2 white - 1 blue
> > > > > But how do I output it like: 3 - 1- 2 - 1 ? And each number needs
> to
> > be
> > > > in
> > > > > another field.
> > > > >
> > > > > ---
> > > > > on mouseup
> > > > > if the backgroundcolor of btn "f1" is 255,255,255 then add "1" to
> > field
> > > > > "v1"
> > > > > end mouseup
> > > > >
> > > > > or
> > > > >
> > > > > on mouseup
> > > > > repeat with x=1 to 7
> > > > > put "f" into tButton
> > > > > if the backgroundcolor of btn tButton is 255,255,255
> > > > > then
> > > > > add "1" to field "v1"
> > > > > else
> > > > > add "1" to field "v2"
> > > > > end if
> > > > > end mousep
> > > > >
> > > > > ---
> > > > >
> > > > > What is the best way to do this?
> > > > >
> > > > > Any pointers are welcome.
> > > > >
> > > > >
> > > > > To easier understand what i am trying to do, see this image:
> > > > > http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
> > > > >
> > > > >
> > > > >
> > > > > 

Re: Rotating PNG images

2018-03-05 Thread hh via use-livecode
> Richmond M. wrote:
> Not much.
> Luckily I am building images where the part that needs
> rotating is monochrome so that can
> be rendered as an SVG and imported into a widget.
> This is, however, quite beside the point . . .
> The inability of LiveCode to do something that nearly
> every other program seems to manage "easily".

An image can't be rendered as an SVG. Or do you mean that it
is "traced" to an SVG? This is non-trivial (i.e. not "Not much").
The "nearly every other programs" (which else than Inkscape and
Gimp?) can't do it "easily", they all use "Potrace".

That can LC also easily do. I have already implemented it.

p.s. Are you really looking for PNGtoSVG in order to rotate an image?

___
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: LC server and fonts

2018-03-05 Thread Warren Samples via use-livecode

On 03/05/2018 08:59 AM, Mike Bonner via use-livecode wrote:

If you create a directory called '.fonts' under
your user name and install the fonts you want to use in your images in that
directory, LiveCode will find them.

A quick test shows this to be true using LC Server 8.1.4, but you may have
to do some experimenting to get them working in a script accessed through
your web server. Executing a script to show the fontnames works from the
command line but without having done any real investigating, I have to
admit it's not working when accessed through my server.



This may need clarification. Getting the fontnames works always but the 
list returned when doing it from a served page doesn't include the fonts 
in ~/.fonts while running the same script from the command line using 
ssh does show those fonts. I don't know why and didn't investigate any 
further.


Warren

___
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: Rotating PNG images

2018-03-05 Thread Richmond Mathewson via use-livecode

Not much.

Luckily I am building images where the part that needs
rotating is monochrome so that can
be rendeered as an SVG and imported into a widget.

This is, however, quite beside the point . . .

The inability of LiveCode to do something that nearly
every other program seems to manage "easily".

Richmond.

On 5/3/2018 5:22 pm, Mike Bonner via use-livecode wrote:

if you set the resizequality of your images to "best" prior to rotating,
does it help? It should make quite a difference.

On Sun, Mar 4, 2018 at 3:48 AM, Richmond Mathewson via use-livecode <
use-livecode@lists.runrev.com> wrote:


I have just spent/wasted 60 minutes rotating 64 PNG images in GIMP
because LiveCode is incapable of rotating anything other than SVG images
without a bad case of the "jaggies".

Now I will have to import those 64 images into a stack and store them
somewhere
unseen to present inwith graphic objects .  .  . resulting in a
considerable overhead
in terms of physical storage,
RAM and coding time.

If GIMP (which is FREE) can rotate images of all sorts without any
perceivable
deterioration in image quality why can't LiveCode?

Richmond.
___
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


___
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


___
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-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 explained it.

Did you see my picture?
http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg


greetings.

William



2018-03-05 16:10 GMT+01:00 Mike Bonner via use-livecode <
use-livecode@lists.runrev.com>:

> 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 then tell you the "bit patteren" of your row.
>
> Not fully awake yet, so if there is anything wrong with my example,
> hopefully it still makes sense.
>
> On Mon, Mar 5, 2018 at 5:50 AM, William de Smet via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > 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?
> >
> >
> >
> > groeten,
> >
> > William
> >
> >
> >
> > 2018-03-05 13:40 GMT+01:00 Jose Enrique Montero via use-livecode <
> > use-livecode@lists.runrev.com>:
> >
> > > 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 template in which users (small children) can
> > > > 'pixeldraw' something and based on the drawing the instruction will
> be
> > > > made.
> > > > The instruction is needed for other children to make the pixel
> drawing.
> > > > The instruction is quite special.
> > > >
> > > > The template is a square with 49 buttons (7x7) for the coloring and
> 49
> > > > fields for the instruction.
> > > > The coloring of the buttons is no problem. The 'reverse' coloring is
> > the
> > > > problem.
> > > > I can get the amount of a colors in a row (5 x white and 2 x blue)
> but
> > > how
> > > > do I determine on which place (in which buttons) these colors are.
> > > > The first row is: 3 white - 1 blue - 2 white - 1 blue
> > > > But how do I output it like: 3 - 1- 2 - 1 ? And each number needs to
> be
> > > in
> > > > another field.
> > > >
> > > > ---
> > > > on mouseup
> > > > if the backgroundcolor of btn "f1" is 255,255,255 then add "1" to
> field
> > > > "v1"
> > > > end mouseup
> > > >
> > > > or
> > > >
> > > > on mouseup
> > > > repeat with x=1 to 7
> > > > put "f" into tButton
> > > > if the backgroundcolor of btn tButton is 255,255,255
> > > > then
> > > > add "1" to field "v1"
> > > > else
> > > > add "1" to field "v2"
> > > > end if
> > > > end mousep
> > > >
> > > > ---
> > > >
> > > > What is the best way to do this?
> > > >
> > > > Any pointers are welcome.
> > > >
> > > >
> > > > To easier understand what i am trying to do, see this image:
> > > > http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
> > > >
> > > >
> > > >
> > > > greetings,
> > > >
> > > > William
> > > > ___
> > > > 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
> > > >
> > > ___
> > > 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
> > >
> > ___
> > 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
> >
> ___
> 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
>
___
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: Rotating PNG images

2018-03-05 Thread Mike Bonner via use-livecode
if you set the resizequality of your images to "best" prior to rotating,
does it help? It should make quite a difference.

On Sun, Mar 4, 2018 at 3:48 AM, Richmond Mathewson via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I have just spent/wasted 60 minutes rotating 64 PNG images in GIMP
> because LiveCode is incapable of rotating anything other than SVG images
> without a bad case of the "jaggies".
>
> Now I will have to import those 64 images into a stack and store them
> somewhere
> unseen to present inwith graphic objects .  .  . resulting in a
> considerable overhead
> in terms of physical storage,
> RAM and coding time.
>
> If GIMP (which is FREE) can rotate images of all sorts without any
> perceivable
> deterioration in image quality why can't LiveCode?
>
> Richmond.
> ___
> 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
>
___
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-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 then tell you the "bit patteren" of your row.

Not fully awake yet, so if there is anything wrong with my example,
hopefully it still makes sense.

On Mon, Mar 5, 2018 at 5:50 AM, William de Smet via use-livecode <
use-livecode@lists.runrev.com> wrote:

> 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?
>
>
>
> groeten,
>
> William
>
>
>
> 2018-03-05 13:40 GMT+01:00 Jose Enrique Montero via use-livecode <
> use-livecode@lists.runrev.com>:
>
> > 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 template in which users (small children) can
> > > 'pixeldraw' something and based on the drawing the instruction will be
> > > made.
> > > The instruction is needed for other children to make the pixel drawing.
> > > The instruction is quite special.
> > >
> > > The template is a square with 49 buttons (7x7) for the coloring and 49
> > > fields for the instruction.
> > > The coloring of the buttons is no problem. The 'reverse' coloring is
> the
> > > problem.
> > > I can get the amount of a colors in a row (5 x white and 2 x blue) but
> > how
> > > do I determine on which place (in which buttons) these colors are.
> > > The first row is: 3 white - 1 blue - 2 white - 1 blue
> > > But how do I output it like: 3 - 1- 2 - 1 ? And each number needs to be
> > in
> > > another field.
> > >
> > > ---
> > > on mouseup
> > > if the backgroundcolor of btn "f1" is 255,255,255 then add "1" to field
> > > "v1"
> > > end mouseup
> > >
> > > or
> > >
> > > on mouseup
> > > repeat with x=1 to 7
> > > put "f" into tButton
> > > if the backgroundcolor of btn tButton is 255,255,255
> > > then
> > > add "1" to field "v1"
> > > else
> > > add "1" to field "v2"
> > > end if
> > > end mousep
> > >
> > > ---
> > >
> > > What is the best way to do this?
> > >
> > > Any pointers are welcome.
> > >
> > >
> > > To easier understand what i am trying to do, see this image:
> > > http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
> > >
> > >
> > >
> > > greetings,
> > >
> > > William
> > > ___
> > > 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
> > >
> > ___
> > 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
> >
> ___
> 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
>
___
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: LC server and fonts

2018-03-05 Thread Mike Bonner via use-livecode
With on-rev, I put up this script..

" & cr
end repeat
?>

And it works fine, with the exception of fonts with a - in the name.  All
of them are Hershey fonts, so not sure if its the font family that is
broken, or the dashes causing the issue.

If you have a ttf font file to use, you can probably put it on your server
next to your script and:
load font file "nameofyourfont.ttf"
and then set the textfont to "nameofyourfont" and it will likely work.

To see my script in action, check here:  http://guidezone.info/fonttest.lc

On Sun, Mar 4, 2018 at 8:21 AM, Warren Samples via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 03/02/2018 04:14 AM, jbv via use-livecode wrote:
>
>> Hello list
>> How can I load ttf font files with LC server, at least version 7.1
>> available on my on-rev account ?
>> Neither "revFontLoad" nor "start using font file" seem to work...
>> And the list of available fonts returned by "the fontNames" is quite
>> limited...
>>
>> Thanks in advance.
>> jbv
>>
>>
>>
> Does on-rev run on Linux? If you create a directory called '.fonts' under
> your user name and install the fonts you want to use in your images in that
> directory, LiveCode will find them.
>
> A quick test shows this to be true using LC Server 8.1.4, but you may have
> to do some experimenting to get them working in a script accessed through
> your web server. Executing a script to show the fontnames works from the
> command line but without having done any real investigating, I have to
> admit it's not working when accessed through my server. This isn't an
> on-rev nor an Apache server so ymmv. If you decide to go the standalone
> route, you should be able to install your fonts this way to use them in the
> standalone.
>
> Good luck!
>
> Warren
>
>
> ___
> 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
>
___
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


[ANN] This Week in LiveCode 119

2018-03-05 Thread panagiotis merakos via use-livecode
Hi all,

Read about new developments in LiveCode open source and the open source
community in today's edition of the "This Week in LiveCode" newsletter!

Read issue #119 here: https://goo.gl/nHi73d

This is a weekly newsletter about LiveCode, focussing on what's been
going on in and around the open source project. New issues will be
released weekly on Mondays. We have a dedicated mailing list that will
deliver each issue directly to you e-mail, so you don't miss any!

If you have anything you'd like mentioned (a project, a discussion
somewhere, an upcoming event) then please get in touch.


-- 
Panagiotis Merakos 
LiveCode Software Developer

Everyone Can Create Apps 
___
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


Overwriting a file on a server

2018-03-05 Thread Graham Samuel via use-livecode
Another dumb question, I’m afraid. The dictionary says I can do

  put tdata into URL [some url]

well, I want to put a file on my server (in this example, it’s a text file) to 
replace one of the same name. If I just try to steamroller it by ignoring the 
existing file, I get a ‘405’ error (forbidden method, I think). If I use an FTP 
client like Transmit, I get a warning about overwriting the file and a manual 
override.

How can I grow my own, by detecting the existing file and then overwriting it 
anyway? Should I delete the existing file as a separate operation? How can I be 
sure I have enough permission to do so?

I feel stupid asking all these questions - my only excuse is that LC has made 
it look sooo simple that I actually thought it was simple.

TIA for any advice

Graham
___
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

Get URL anomaly

2018-03-05 Thread Graham Samuel via use-livecode
Thanks to Charles Warwick I now understand that when using LC Indy versions, 
tsNet is automatically included both in standalones and the IDE. So, there 
should be no real difference between doing some simple ‘getting’ in either 
environment. Perhaps there isn’t, but I have run into an anomaly that I can’t 
understand.

As in some of my previous mails, I’m talking about having to retrieve a tiny 
text file from a server (and later put a modified version of it back, but let’s 
get one problem solved at a time) The whole thing is just a few lines of code:

 constant myFileOnTheServer = "www.myserver.comm/mytextfile.txt”

 put “http://“ & myFileOnTheServer into t1

 get URL t1

 if the result is empty then

do stuff with ‘it’, where the text file is placed

   …

I can make this work in the IDE every time, and can verify that the text file 
is intact.

I can make it work in a standalone that does almost nothing more than the 
above, apart from filling in the odd field.

BUT in a more complex real app, the exact same code which works every time in 
the IDE returns an empty result (indicating ’no error’), but the file is not 
transferred (‘it’ is empty). Obviously I must have done something wrong, but it 
doesn’t appear to be the actual coding. Can it be a timing issue? Before the 
code is executed in my app, there is quite a bit of looking at local files on 
the hard disk (this is a desktop app), but I don’t see that this could have a 
bearing on the issue. I am logging everything, but I just can’t see what is 
going wrong.

It must be something I’m doing, but what?

TIA

Graham
___
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: tsNet or not tsNet?

2018-03-05 Thread Graham Samuel via use-livecode
Thanks, very clear explanation! I’m using Indy (i.e Commercial) versions, so 
now I understand.

Graham

> On 5 Mar 2018, at 12:27, Charles Warwick via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
> In commercial versions of LiveCode, the default behaviour of the Internet 
> library (libUrl) is to include and use tsNet.
> 
> It calls tsNetInit on startup so that you don’t need to do that separately.
> 
> Hope that helps,
> 
> Charles
> 
>> On 5 Mar 2018, at 7:21 pm, Graham Samuel via use-livecode 
>>  wrote:
>> 
>> I’ve been executing this line of script in an app made on a Mac with LC 
>> 9.0.0 dp11
>> get URL “http://www.myserver.com/mytextfile 
>> .txt
>> 
>> It works fine, but I also wanted to detect what happens when the connection 
>> can't be established, so I made the command fail by switching off internet 
>> access on my machine. I got an error in ‘the result’, as expected. Or at 
>> least I got one when the line was executed in the IDE, and this was a tsNet 
>> error. As I had not initialised tsNet in my script - according to the 
>> dictionary, this **must** be done before tsNet functions are used - I 
>> concluded that the IDE had done it for me.
>> 
>> Fair enough, but I then reasoned that if I wanted to see the same kind of 
>> explicit error messages in my standalone, I would have to include a call to 
>> tsNetInit in my script. However, I created a little test app which 
>> **doesn’t** make any tsNet calls, certainly not initialising the package, 
>> but I still get a tsNet style error, e.g.
>> 
>>> tsneterr: (6) Could not resolve host: www.myserver.com 
>> 
>> So, what’s going on? Is tsNet now always included in a standalone, and if 
>> so, how does it get initialised?
>> 
>> Puzzled, not for the first time.
>> 
>> Graham
>> 
>> ___
>> 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
> 
> 
> ___
> 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


___
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-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?



groeten,

William



2018-03-05 13:40 GMT+01:00 Jose Enrique Montero via use-livecode <
use-livecode@lists.runrev.com>:

> 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 template in which users (small children) can
> > 'pixeldraw' something and based on the drawing the instruction will be
> > made.
> > The instruction is needed for other children to make the pixel drawing.
> > The instruction is quite special.
> >
> > The template is a square with 49 buttons (7x7) for the coloring and 49
> > fields for the instruction.
> > The coloring of the buttons is no problem. The 'reverse' coloring is the
> > problem.
> > I can get the amount of a colors in a row (5 x white and 2 x blue) but
> how
> > do I determine on which place (in which buttons) these colors are.
> > The first row is: 3 white - 1 blue - 2 white - 1 blue
> > But how do I output it like: 3 - 1- 2 - 1 ? And each number needs to be
> in
> > another field.
> >
> > ---
> > on mouseup
> > if the backgroundcolor of btn "f1" is 255,255,255 then add "1" to field
> > "v1"
> > end mouseup
> >
> > or
> >
> > on mouseup
> > repeat with x=1 to 7
> > put "f" into tButton
> > if the backgroundcolor of btn tButton is 255,255,255
> > then
> > add "1" to field "v1"
> > else
> > add "1" to field "v2"
> > end if
> > end mousep
> >
> > ---
> >
> > What is the best way to do this?
> >
> > Any pointers are welcome.
> >
> >
> > To easier understand what i am trying to do, see this image:
> > http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
> >
> >
> >
> > greetings,
> >
> > William
> > ___
> > 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
> >
> ___
> 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
>
___
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-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 template in which users (small children) can
> 'pixeldraw' something and based on the drawing the instruction will be
> made.
> The instruction is needed for other children to make the pixel drawing.
> The instruction is quite special.
>
> The template is a square with 49 buttons (7x7) for the coloring and 49
> fields for the instruction.
> The coloring of the buttons is no problem. The 'reverse' coloring is the
> problem.
> I can get the amount of a colors in a row (5 x white and 2 x blue) but how
> do I determine on which place (in which buttons) these colors are.
> The first row is: 3 white - 1 blue - 2 white - 1 blue
> But how do I output it like: 3 - 1- 2 - 1 ? And each number needs to be in
> another field.
>
> ---
> on mouseup
> if the backgroundcolor of btn "f1" is 255,255,255 then add "1" to field
> "v1"
> end mouseup
>
> or
>
> on mouseup
> repeat with x=1 to 7
> put "f" into tButton
> if the backgroundcolor of btn tButton is 255,255,255
> then
> add "1" to field "v1"
> else
> add "1" to field "v2"
> end if
> end mousep
>
> ---
>
> What is the best way to do this?
>
> Any pointers are welcome.
>
>
> To easier understand what i am trying to do, see this image:
> http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
>
>
>
> greetings,
>
> William
> ___
> 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
>
___
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


Rotating PNG images

2018-03-05 Thread Richmond Mathewson via use-livecode

I have just spent/wasted 60 minutes rotating 64 PNG images in GIMP
because LiveCode is incapable of rotating anything other than SVG images
without a bad case of the "jaggies".

Now I will have to import those 64 images into a stack and store them 
somewhere
unseen to present inwith graphic objects .  .  . resulting in a 
considerable overhead

in terms of physical storage,
RAM and coding time.

If GIMP (which is FREE) can rotate images of all sorts without any 
perceivable

deterioration in image quality why can't LiveCode?

Richmond.
___
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: [Completely OT] Withdrawal symptoms from Slashdot

2018-03-05 Thread Dan Brown via use-livecode
Hacker News always has some interesting reading. The comments section for
each submission can be insightful as a broad range of programmers/
engineers that work in the relevant fields share thoughts and knowledge on
the topics at hand

https://news.ycombinator.com/

"*Hacker News* is a social news
 website focusing on computer
science  and
entrepreneurship . It is
run by Paul Graham
's
investment fund and startup incubator, Y Combinator
. In general,
content that can be submitted is defined as "anything that gratifies one's
intellectual curiosity"




On 4 Mar 2018 12:10 am, "Alex Tweedly via use-livecode" <
use-livecode@lists.runrev.com> wrote:

> Completely off topic, but I need help ;-)
>
> For many years now my standard "I have 30 seconds (or minutes) to fill in,
> what's happening in the world" web site has been slashdot, but it seems to
> be completely off the air for now.
>
> I'm looking for suggestions for alternates that are worth using while
> waiting for a build, or just to give me some interesting. The less video,
> the better :-)
>
> Thanks
>
> Alex.
>
>
> ___
> 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
>
___
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: tsNet or not tsNet?

2018-03-05 Thread Charles Warwick via use-livecode
Hi Graham,

In commercial versions of LiveCode, the default behaviour of the Internet 
library (libUrl) is to include and use tsNet.

It calls tsNetInit on startup so that you don’t need to do that separately.

Hope that helps,

Charles

> On 5 Mar 2018, at 7:21 pm, Graham Samuel via use-livecode 
>  wrote:
> 
> I’ve been executing this line of script in an app made on a Mac with LC 9.0.0 
> dp11
> get URL “http://www.myserver.com/mytextfile 
> .txt
> 
> It works fine, but I also wanted to detect what happens when the connection 
> can't be established, so I made the command fail by switching off internet 
> access on my machine. I got an error in ‘the result’, as expected. Or at 
> least I got one when the line was executed in the IDE, and this was a tsNet 
> error. As I had not initialised tsNet in my script - according to the 
> dictionary, this **must** be done before tsNet functions are used - I 
> concluded that the IDE had done it for me.
> 
> Fair enough, but I then reasoned that if I wanted to see the same kind of 
> explicit error messages in my standalone, I would have to include a call to 
> tsNetInit in my script. However, I created a little test app which 
> **doesn’t** make any tsNet calls, certainly not initialising the package, but 
> I still get a tsNet style error, e.g.
> 
>> tsneterr: (6) Could not resolve host: www.myserver.com 
> 
> So, what’s going on? Is tsNet now always included in a standalone, and if so, 
> how does it get initialised?
> 
> Puzzled, not for the first time.
> 
> Graham
> 
> ___
> 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


___
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

Hyphenator

2018-03-05 Thread hh via use-livecode
Just uploaded a LiveCode Hyphenator.
The stack uses Hyphenator.js (by M. Nater, MIT licensed) in a browser widget
with your input. It runs using LC 8/9 on Mac/ Win 7+10/ Ubuntu.

You get as plain text
1. The hyphenated text (using the selected language patterns) displayed
in a browser widget, the hyphenation based on the famous Liang-algorithm.
2. The input with the softhyphens indicated (these are editable/changeable).
3. A LC field hyphenated according to the patterns (own algorithm).

So you can use the text in a browser widget OR get hyphenated text for your
LC field (or both). The algorithms are very fast.
[Or you use the given softhyphened words to write your own algorithm ...]

The stack is made for offline use and supports currently 18 languages:
cs/ Czech, da/ Danish, de/ German, el/ Greek, en-gb/ British English,
en-us/ American English, es/ Spanish, fi/ Finnish, fr/French, hu/ Hungarian,
it/ Italian, la/ Latin, nl/ Dutch, no/ Norwegian, pl/ Polish, pt/ Portuguese,
sv/ Swedish and tr/ Turkish.

Download "Hyphenator" from "Sample Stacks"
(or http://livecodeshare.runrev.com/stack/868).


___
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: [Completely OT] Withdrawal symptoms from Slashdot

2018-03-05 Thread Mark Wieder via use-livecode

On 03/03/2018 04:09 PM, Alex Tweedly via use-livecode wrote:

Completely off topic, but I need help ;-)

For many years now my standard "I have 30 seconds (or minutes) to fill 
in, what's happening in the world" web site has been slashdot, but it 
seems to be completely off the air for now.


I'm looking for suggestions for alternates that are worth using while 
waiting for a build, or just to give me some interesting. The less 
video, the better :-)


/. is back on the air now, but nonetheless...

https://www.mercurynews.com/tag/siliconbeat/
https://whatthefuckjusthappenedtoday.com/
https://www.boingboing.net

--
 Mark Wieder
 ahsoftw...@gmail.com

___
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


Reverse 'pixelcoloring' and total amount of colors

2018-03-05 Thread William de Smet via use-livecode
Hi there,

This is quite a challenge for me.
I an trying to build a template in which users (small children) can
'pixeldraw' something and based on the drawing the instruction will be made.
The instruction is needed for other children to make the pixel drawing.
The instruction is quite special.

The template is a square with 49 buttons (7x7) for the coloring and 49
fields for the instruction.
The coloring of the buttons is no problem. The 'reverse' coloring is the
problem.
I can get the amount of a colors in a row (5 x white and 2 x blue) but how
do I determine on which place (in which buttons) these colors are.
The first row is: 3 white - 1 blue - 2 white - 1 blue
But how do I output it like: 3 - 1- 2 - 1 ? And each number needs to be in
another field.

---
on mouseup
if the backgroundcolor of btn "f1" is 255,255,255 then add "1" to field "v1"
end mouseup

or

on mouseup
repeat with x=1 to 7
put "f" into tButton
if the backgroundcolor of btn tButton is 255,255,255
then
add "1" to field "v1"
else
add "1" to field "v2"
end if
end mousep

---

What is the best way to do this?

Any pointers are welcome.


To easier understand what i am trying to do, see this image:
http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg



greetings,

William
___
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: LC server and fonts

2018-03-05 Thread Warren Samples via use-livecode

On 03/02/2018 04:14 AM, jbv via use-livecode wrote:

Hello list
How can I load ttf font files with LC server, at least version 7.1
available on my on-rev account ?
Neither "revFontLoad" nor "start using font file" seem to work...
And the list of available fonts returned by "the fontNames" is quite
limited...

Thanks in advance.
jbv




Does on-rev run on Linux? If you create a directory called '.fonts' 
under your user name and install the fonts you want to use in your 
images in that directory, LiveCode will find them.


A quick test shows this to be true using LC Server 8.1.4, but you may 
have to do some experimenting to get them working in a script accessed 
through your web server. Executing a script to show the fontnames works 
from the command line but without having done any real investigating, I 
have to admit it's not working when accessed through my server. This 
isn't an on-rev nor an Apache server so ymmv. If you decide to go the 
standalone route, you should be able to install your fonts this way to 
use them in the standalone.


Good luck!

Warren

___
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


tsNet or not tsNet?

2018-03-05 Thread Graham Samuel via use-livecode
I’ve been executing this line of script in an app made on a Mac with LC 9.0.0 
dp11
 get URL “http://www.myserver.com/mytextfile 
.txt

It works fine, but I also wanted to detect what happens when the connection 
can't be established, so I made the command fail by switching off internet 
access on my machine. I got an error in ‘the result’, as expected. Or at least 
I got one when the line was executed in the IDE, and this was a tsNet error. As 
I had not initialised tsNet in my script - according to the dictionary, this 
**must** be done before tsNet functions are used - I concluded that the IDE had 
done it for me.

Fair enough, but I then reasoned that if I wanted to see the same kind of 
explicit error messages in my standalone, I would have to include a call to 
tsNetInit in my script. However, I created a little test app which **doesn’t** 
make any tsNet calls, certainly not initialising the package, but I still get a 
tsNet style error, e.g.

> tsneterr: (6) Could not resolve host: www.myserver.com 

So, what’s going on? Is tsNet now always included in a standalone, and if so, 
how does it get initialised?

Puzzled, not for the first time.

Graham

___
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

tsNet or not tsNet?

2018-03-05 Thread Graham Samuel via use-livecode
This message may be a repeat. If you see two copies on the list, I apologise.

===

I’ve been executing this line of script in an app made on a Mac with LC 9.0.0 
dp11
 get URL “http://www.myserver.com/mytextfile 
.txt

It works fine, but I also wanted to detect what happens when the connection 
can't be established, so I made the command fail by switching off internet 
access on my machine. I got an error in ‘the result’, as expected. Or at least 
I got one when the line was executed in the IDE, and this was a tsNet error. As 
I had not initialised tsNet in my script - according to the dictionary, this 
**must** be done before tsNet functions are used - I concluded that the IDE had 
done it for me.

Fair enough, but I then reasoned that if I wanted to see the same kind of 
explicit error messages in my standalone, I would have to include a call to 
tsNetInit in my script. However, I created a little test app which **doesn’t** 
make any tsNet calls, certainly not initialising the package, but I still get a 
tsNet style error, e.g.

> tsneterr: (6) Could not resolve host: www.myserver.com 
>  

So, what’s going on? Is tsNet now always included in a standalone, and if so, 
how does it get initialised?

Puzzled, not for the first time.

Graham

___
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

this is a test

2018-03-05 Thread Graham Samuel via use-livecode
Just a test, please ignore…

(in case you were wondering, my mail client has just seen the first mail to 
this list since 3rd March, but I know that some are missing.)
___
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: [Completely OT] Withdrawal symptoms from Slashdot

2018-03-05 Thread Rodney Somerstein via use-livecode
Slashdot is definitely still there. Make sure you are going to 
https://slashdot.org . I suppose they may have been having a problem the 
last time you tried the site, but it is definitely up and running right 
now.



Alex Tweedly via use-livecode 
March 3, 2018 at 7:09 PM
Completely off topic, but I need help ;-)

For many years now my standard "I have 30 seconds (or minutes) to fill 
in, what's happening in the world" web site has been slashdot, but it 
seems to be completely off the air for now.


I'm looking for suggestions for alternates that are worth using while 
waiting for a build, or just to give me some interesting. The less 
video, the better :-)


Thanks

Alex.




___
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