Search found 142 matches

by Fermin
Sat Aug 26, 2023 7:33 pm
Forum: Talking LiveCode
Topic: counting occurrences
Replies: 17
Views: 14591

Re: counting occurrences

Code: Select all

function CountOccurrences haystack, needle
   set the itemdelimiter to needle
   return the number of items in haystack - 1
end CountOccurrences
by Fermin
Sat Apr 29, 2023 4:02 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using expressions with "<" and ">"
Replies: 17
Views: 9165

Re: Using expressions with "<" and ">"

Thank you for your answers. I understand the problem now and will try to find another way to fix it. As a curiosity: I presented the problem to ChatGPT and it's clear that it doesn't have any complexes. It may not have any idea what it's saying, but at least it says it with a lot of confidence. :D A...
by Fermin
Sat Apr 29, 2023 8:53 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using expressions with "<" and ">"
Replies: 17
Views: 9165

Using expressions with "<" and ">"

Does anyone know how to force LiveCode to return a string instead of calculating the result when using "<" and ">" and "</" ? With the PUT command there is no problem, but I need it with ANSWER or RETURN to deliver a result within a routine. For example: answer "<" & aaa & ">" & 555 & "</" & aaa & "...
by Fermin
Fri Apr 14, 2023 7:37 pm
Forum: Talking LiveCode
Topic: revRotatePoly
Replies: 9
Views: 3388

Re: revRotatePoly

Thank you, Richmond... and Thank you very much, Bernd!!! Understood, applied, and problem solved. :D
by Fermin
Fri Apr 14, 2023 6:50 pm
Forum: Talking LiveCode
Topic: revRotatePoly
Replies: 9
Views: 3388

Re: revRotatePoly

"Power to the squares!!! :shock:
... Anyway, nothing to do about it. Let's see if I can figure out the solution. :roll:
by Fermin
Fri Apr 14, 2023 6:00 pm
Forum: Talking LiveCode
Topic: revRotatePoly
Replies: 9
Views: 3388

Re: revRotatePoly

Thanks Richmond. In my case, adapting to your example, it would be something like this: Let's say I modify the points of that graphic 'p5' so that instead of a pentagon it draws a square, for example. Okay, I would see the square then. However, as soon as I execute the same code again: revRotatePoly...
by Fermin
Fri Apr 14, 2023 5:17 pm
Forum: Talking LiveCode
Topic: revRotatePoly
Replies: 9
Views: 3388

revRotatePoly

Hi, can someone please help me?, I'm having a problem with revRotatePoly.
Every time I use it to preview a recently modified graphic object, a polygon I created earlier on that same object shows up. Can anyone help me figure out why this is happening? Thanks a lot.
by Fermin
Tue Feb 01, 2022 7:58 pm
Forum: Talking LiveCode
Topic: Could it be that libURLDownloadToFile doesn't work with some website?
Replies: 9
Views: 3457

Re: Could it be that libURLDownloadToFile doesn't work with some website?

I had indicated it in the post where I put my version of your code but I think it was not very obvious because it was as a comment at the end of two lines. With the website kiosko.net, tStatus = "error". With the web lasportadas.es, tStatus = "downloaded". The strangest thing is that I used the same...
by Fermin
Tue Feb 01, 2022 6:37 pm
Forum: Talking LiveCode
Topic: Could it be that libURLDownloadToFile doesn't work with some website?
Replies: 9
Views: 3457

Re: Could it be that libURLDownloadToFile doesn't work with some website?

It's true, I'm sorry, I noticed it at first but then I lost track of it... but then I don't understand what's going on. I'm starting to think I've been banned ( :lol: ). Anyway, I'm going to keep investigating to see if I can find the error.
Thank you very much for your time and attention, Klaus.
by Fermin
Tue Feb 01, 2022 5:55 pm
Forum: Talking LiveCode
Topic: Could it be that libURLDownloadToFile doesn't work with some website?
Replies: 9
Views: 3457

Re: Could it be that libURLDownloadToFile doesn't work with some website?

I'm using MacOS Sierra (10.12.6) with Livecode 9.0.0. and until a few months ago, everything worked correctly there. In fact I reserve that computer without updating because it seems to me that on later operating systems, LC has other problems. I have another computer with Monterey (version 12.1) an...
by Fermin
Tue Feb 01, 2022 5:42 pm
Forum: Talking LiveCode
Topic: Could it be that libURLDownloadToFile doesn't work with some website?
Replies: 9
Views: 3457

Re: Could it be that libURLDownloadToFile doesn't work with some website?

Hi Klaus, nice to greet you. Using your code I have the same problem, on one site (lasportadas.es) it works but on KIOSKO.NET, it does not. Can you download the correct file from kiosko.net? in mouseUp /*220201-1659*/ put "https://img.kiosko.net/2022/02/01/es/elmundo.750.jpg" in tUrl -- tStatus = "e...
by Fermin
Tue Feb 01, 2022 9:46 am
Forum: Talking LiveCode
Topic: Could it be that libURLDownloadToFile doesn't work with some website?
Replies: 9
Views: 3457

Could it be that libURLDownloadToFile doesn't work with some website?

Hello. Some time ago I made a LiveCode application to download newspaper covers (jpg files) from a website (https://es.kiosko.net/) and it worked perfectly. I haven't used it for a few months and now, when I try it again I see that it only downloads empty files (0 bytes). I use the libURLDownloadToF...
by Fermin
Wed Dec 15, 2021 5:38 pm
Forum: Talking LiveCode
Topic: How to export to PDF an exact area of a card.
Replies: 6
Views: 2767

Re: How to export to PDF an exact area of a card.

Siiii!
Yes, it seems to be working, I have to do some definitive tests but I think it's fixed. Thanks once again Klaus. :)
by Fermin
Wed Dec 15, 2021 4:28 pm
Forum: Talking LiveCode
Topic: How to export to PDF an exact area of a card.
Replies: 6
Views: 2767

Re: How to export to PDF an exact area of a card.

Thank you very much, Klaus and sorry for taking so long to reply. What I get with your example is a landscape DIN A4 size pdf with the 50,50 to 300,600 capture inside and what I would need is for the document itself to be the exact size of that capture, i.e. in your example: 250 x 550 (300-50) x (60...

Go to advanced search