Re: charIndex property

2023-07-31 Thread Bob Sneidar via use-livecode
Are you using Thunderbird for an email client? Or are you copying from the forum? This was talked about years ago. For some reason different apps format clipboard text differently, and this is an artifact of one of those apps. That is why I paste, then re-copy code in a text editor like TextEdit

Re: charIndex property

2023-07-31 Thread Bob Sneidar via use-livecode
On Jul 31, 2023, at 8:54 AM, Paul Dupuis via use-livecode wrote: Bob, Here is a version of Mark's method, for trueWords, sentences, and paragraphs, with the added parameter of pDirection to get the char index of the start of the chunk or the end of the chunk containing the character position

Re: charIndex property

2023-07-31 Thread Paul Dupuis via use-livecode
Sent from my iPhone On 27 Jul 2023, at 21:23, Paul Dupuis via use-livecode wrote: On 7/27/2023 4:31 AM, Mark Waddingham via use-livecode wrote: On 2023-07-26 18:02, Paul Dupuis via use-livecode wrote: If I have some text in a field, I can use the "charIndex" property (see Dic

Re: charIndex property

2023-07-31 Thread Paul Dupuis via use-livecode
a use-livecode wrote: On 2023-07-26 18:02, Paul Dupuis via use-livecode wrote: If I have some text in a field, I can use the "charIndex" property (see Dictionary) to obtain teh character position of the first character of a chunk. Does anyone know of a clever way to do the equivalent of

Re: charIndex property

2023-07-31 Thread Bob Sneidar via use-livecode
me lucky? ;) > > Mark. > > Sent from my iPhone > >> On 27 Jul 2023, at 21:23, Paul Dupuis via use-livecode >> wrote: >> >> On 7/27/2023 4:31 AM, Mark Waddingham via use-livecode wrote: >>>> On 2023-07-26 18:02, Paul Dupuis via use-livecode

Re: charIndex property

2023-07-29 Thread Mark Smith via use-livecode
Love it 😂 Sent from my iPhone > On Jul 28, 2023, at 10:36 PM, Bob Sneidar via use-livecode > wrote: > > This is the essence on Livecode! This is why we love it! Shouldn’t we > rebrand it? How about Lovecode?? ….. > > Never mind. 😂 > > Sent from my iPhone > >>> On Jul 28, 2023, at 04:55,

Re: charIndex property

2023-07-28 Thread Bob Sneidar via use-livecode
This is the essence on Livecode! This is why we love it! Shouldn’t we rebrand it? How about Lovecode?? ….. Never mind. 😂 Sent from my iPhone > On Jul 28, 2023, at 04:55, Paul Dupuis via use-livecode > wrote: > > On 7/27/2023 5:06 PM, Mark Waddingham via use-livecode wrote: >> Oh those pesky

Re: charIndex property

2023-07-28 Thread Paul Dupuis via use-livecode
On 7/27/2023 5:06 PM, Mark Waddingham via use-livecode wrote: Oh those pesky chunks which don’t ‘cover’ the target string (which is actually all of them except codeunit/point/char come to think of it). I should have run through a few more examples in my head before posting…. Alternative attemp

Re: charIndex property

2023-07-27 Thread Mark Waddingham via use-livecode
. Sent from my iPhone > On 27 Jul 2023, at 21:23, Paul Dupuis via use-livecode > wrote: > > On 7/27/2023 4:31 AM, Mark Waddingham via use-livecode wrote: >>> On 2023-07-26 18:02, Paul Dupuis via use-livecode wrote: >>> If I have some text in a field, I can use

Re: charIndex property

2023-07-27 Thread Paul Dupuis via use-livecode
On 7/27/2023 4:31 AM, Mark Waddingham via use-livecode wrote: On 2023-07-26 18:02, Paul Dupuis via use-livecode wrote: If I have some text in a field, I can use the "charIndex" property (see Dictionary) to obtain teh character position of the first character of a chunk. Does anyone

Re: charIndex property

2023-07-27 Thread Mark Waddingham via use-livecode
On 2023-07-26 18:02, Paul Dupuis via use-livecode wrote: If I have some text in a field, I can use the "charIndex" property (see Dictionary) to obtain teh character position of the first character of a chunk. Does anyone know of a clever way to do the equivalent of the charInd

Re: charIndex property

2023-07-26 Thread Paul Dupuis via use-livecode
On 7/26/2023 8:00 PM, Mike Kerner via use-livecode wrote: actually, i have a couple of questions, which are maybe suggestions, but are actually questions, because maybe someone else will be curious enough to try to solve them * did you check the oss source to see if the function is available? No.

Re: charIndex property

2023-07-26 Thread Mike Kerner via use-livecode
actually, i have a couple of questions, which are maybe suggestions, but are actually questions, because maybe someone else will be curious enough to try to solve them * did you check the oss source to see if the function is available? * have you messed with using regex to get around the issue? On

Re: charIndex property

2023-07-26 Thread Paul Dupuis via use-livecode
On 7/26/2023 1:13 PM, Bob Sneidar via use-livecode wrote: OIC what that does. I suggest having a hidden field, setting the text of that field to your variable, then operating on that field. Bob S That is what I am currently doing. And I have a hidden field, hidden image, hidden player - all

Re: charIndex property

2023-07-26 Thread Bob Sneidar via use-livecode
10:02 AM, Paul Dupuis via use-livecode >> wrote: >> >> If I have some text in a field, I can use the "charIndex" property (see >> Dictionary) to obtain teh character position of the first character of a >> chunk. >> >> For example, if the fi

Re: charIndex property

2023-07-26 Thread Bob Sneidar via use-livecode
Offset? Bob S > On Jul 26, 2023, at 10:02 AM, Paul Dupuis via use-livecode > wrote: > > If I have some text in a field, I can use the "charIndex" property (see > Dictionary) to obtain teh character position of the first character of a > chunk. > >

charIndex property

2023-07-26 Thread Paul Dupuis via use-livecode
If I have some text in a field, I can use the "charIndex" property (see Dictionary) to obtain teh character position of the first character of a chunk. For example, if the field contains: The quick brown fox jumps over the lazy dog. The lazy dog was named "Oz". The lazy