Search found 149 matches

by Fermin
Sat Nov 09, 2024 9:45 pm
Forum: Talking LiveCode
Topic: Issues with Encoding UTF-8 JSON Files in LiveCode for Python Compatibility
Replies: 8
Views: 10728

Re: Issues with Encoding UTF-8 JSON Files in LiveCode for Python Compatibility

Thank you very much for all your help. It is very reassuring to be able to count on this forum.
by Fermin
Sun Nov 03, 2024 12:07 pm
Forum: Talking LiveCode
Topic: Issues with Encoding UTF-8 JSON Files in LiveCode for Python Compatibility
Replies: 8
Views: 10728

Re: Issues with Encoding UTF-8 JSON Files in LiveCode for Python Compatibility

Hello Bernd, Thank you for your suggestion on handling UTF-8 encoding in LiveCode. Although I haven’t tested it exhaustively yet, it seems that the compatibility issue with special characters in JSON files is resolved, which simplifies their use in my text animation application in Python. Much appre...
by Fermin
Sat Nov 02, 2024 1:21 pm
Forum: Talking LiveCode
Topic: Issues with Encoding UTF-8 JSON Files in LiveCode for Python Compatibility
Replies: 8
Views: 10728

Re: Issues with Encoding UTF-8 JSON Files in LiveCode for Python Compatibility

Thank you, Stam, for your recommendation. I appreciate the suggestion of FerrusLogic's PhotonJSON library, especially since it respects UTF-8. While I am still exploring and investigating alternative methods to ensure compatibility with UTF-8, your advice is valuable and certainly something I will c...
by Fermin
Sat Nov 02, 2024 1:58 am
Forum: Talking LiveCode
Topic: Issues with Encoding UTF-8 JSON Files in LiveCode for Python Compatibility
Replies: 8
Views: 10728

Issues with Encoding UTF-8 JSON Files in LiveCode for Python Compatibility

Hello everyone, I’m working on a project where I need to export configuration data from LiveCode to a JSON file. The ultimate goal is for this JSON file to be compatible with a Python program that reads and processes it. The challenge is that the data includes special characters (such as accented le...
by Fermin
Fri Sep 20, 2024 5:36 pm
Forum: Talking LiveCode
Topic: How to Change All Occurrences of a Substring to Uppercase in a Field
Replies: 7
Views: 9852

Re: How to Change All Occurrences of a Substring to Uppercase in a Field

Thank you very much, Richmond, but I'm not sure if it would work when the target is at the beginning of a line or after a period or a comma... Also, the algorithm would need to work both for a single word (e.g., "here") and for a small phrase (e.g., "in front").
by Fermin
Fri Sep 20, 2024 9:13 am
Forum: Talking LiveCode
Topic: How to Change All Occurrences of a Substring to Uppercase in a Field
Replies: 7
Views: 9852

Re: How to Change All Occurrences of a Substring to Uppercase in a Field

I was overcomplicating things. I believe I’ve found the most straightforward way to do it. on mouseUp put "in front" into obje put upper(obje) into obje2 replace obje with obje2 in field almacenb preserving styles end mouseUp mmm... Although I hadn’t considered the problem of finding a substring wit...
by Fermin
Fri Sep 20, 2024 8:01 am
Forum: Talking LiveCode
Topic: How to Change All Occurrences of a Substring to Uppercase in a Field
Replies: 7
Views: 9852

How to Change All Occurrences of a Substring to Uppercase in a Field

Hi, I need help converting all occurrences of a specific substring to uppercase within a field. I’m already using the upper function to convert to uppercase, but my main issue is finding all occurrences of the substring and putting them back in the same position. Is it possible to do this using the ...
by Fermin
Sat Aug 26, 2023 7:33 pm
Forum: Talking LiveCode
Topic: counting occurrences
Replies: 17
Views: 21740

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: 17023

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: 17023

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: 5701

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: 5701

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: 5701

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: 5701

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.