Re: Speaking of Filter and Match...

2022-03-12 Thread Terry Judd via use-livecode
There are sure to be more elegant ways but you could just rebuild the list skipping the duplicates as you go # tList1 contains original list put cr into tList2 repeat for each line x in tList1 if tList2 contains cr&x&cr then # ensures you check whole not partial lines # do nothing

Speaking of Filter and Match...

2022-03-12 Thread Roger Guay via use-livecode
I have a field with about a thousand lines with many duplicate lines, and I want to delete the duplicates. Seems like this should be simple but I am running around in circles. Can anyone help me with this? Thanks, Roger ___ use-livecode mailing list us

Re: Problems with Filter?

2022-03-12 Thread Rick Harrison via use-livecode
Ok, that straightened out my confusion. Thanks! > On Mar 12, 2022, at 5:40 PM, Mark Wieder via use-livecode > wrote: > > Exactly. You want matchtext, not filter. > > There is a way to finesse this if you really need to use filter: > > local tSubString, tTarget, tLargeTextString > local t

Re: Problems with Filter?

2022-03-12 Thread Mark Wieder via use-livecode
On 3/12/22 14:21, Rick Harrison via use-livecode wrote: So what did it filter? It’s the same string I started with. Exactly. You want matchtext, not filter. There is a way to finesse this if you really need to use filter: local tSubString, tTarget, tLargeTextString local tResult p

Re: Problems with Filter?

2022-03-12 Thread Brian Milby via use-livecode
Your source was only one line. The default for filter is to work by line. It returns all lines that match, hence the same string you started with. Sent from my iPhone > On Mar 12, 2022, at 5:22 PM, Rick Harrison via use-livecode > wrote: > >  > put "THIS*FIND" into tTarget > > put “abcdef

Re: Problems with Filter?

2022-03-12 Thread Rick Harrison via use-livecode
put "THIS*FIND" into tTarget put “abcdefghijkTHISISMYTEXTTOFINDlmnopqrstuvwxyz” into tLargeTextString put tLargeTextString into pText — Adding your code here Mark: put ".*THIS.*FIND.*" into tTarget filter pText with regex pattern tTarget into tFilteredTextResult answer "tFilteredTextResult =

Re: LC Player buffering data

2022-03-12 Thread J. Landman Gay via use-livecode
Someone who does a lot of audio work would know more than I do about it, but it used to be that files could be saved in either "normal" mode or "streaming" mode. I didn't make the files I used in a particular app, but they all streamed and playback started immediately while the rest loaded in th

Re: Problems with Filter?

2022-03-12 Thread J. Landman Gay via use-livecode
On 3/12/22 2:29 PM, Brian Milby via use-livecode wrote: Filter removes non-matching lines. Unless you use "filter x without y". -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com __

Re: Speed up a slow loop

2022-03-12 Thread J. Landman Gay via use-livecode
I have to thank everyone who helped me figure out my Boggle game. I've put the current file on Google Drive for anyone who wants to take a look. The scripts are open and I think I've removed all the testing cruft that accumulated over the last couple of weeks. I'd be interested in any feedback

Re: Problems with Filter?

2022-03-12 Thread Mark Wieder via use-livecode
On 3/12/22 12:06, Rick Harrison via use-livecode wrote: Hi Mark, matchText works fine. That doesn’t explain why “filter” doesn’t work though. Yes. It does. Filter won't give you a substring. You can use filter to get the whole line of text, but you'll still have to dig out the substring if

Re: Problems with Filter?

2022-03-12 Thread Brian Milby via use-livecode
Filter removes non-matching lines. On Sat, Mar 12, 2022 at 3:07 PM Rick Harrison via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi Mark, > > matchText works fine. > > That doesn’t explain why “filter” doesn’t work though. > > Thanks! > > Rick > > > On Mar 12, 2022, at 2:05 PM, Mark Wi

Re: Problems with Filter?

2022-03-12 Thread Rick Harrison via use-livecode
Hi Mark, matchText works fine. That doesn’t explain why “filter” doesn’t work though. Thanks! Rick > On Mar 12, 2022, at 2:05 PM, Mark Wieder via use-livecode > wrote: > > Try matchtext rather than filter: > > local tTextt, tFound? > put matchtext(tLargeTextString, ".*THIS(.*)FIND.*", tTex

Re: Problems with Filter?

2022-03-12 Thread Mark Wieder via use-livecode
On 3/12/22 08:43, Rick Harrison via use-livecode wrote: Good Morning! I’m trying to get filter to work with some text and so far no success at all. Given large string: abcdefghijkTHISISMYTEXTTOFINDlmnopqrstuvwxyz I want the text between THIS and FIND which could be anything like ISLJFKKDKLS

Re: Problems with Filter?

2022-03-12 Thread Jim Lambert via use-livecode
Try: put "*THISISMYTEXTTOFIND*" into tTarget put “abcdefghijkTHISISMYTEXTTOFINDlmnopqrstuvwxyz” into tLargeTextString put tLargeTextString into pText filter pText with tTarget into tFilteredTextResult answer "tFilteredTextResult = " & tFilteredTextResult Or more simply: filter tLargeTextString

Problems with Filter?

2022-03-12 Thread Rick Harrison via use-livecode
Good Morning! I’m trying to get filter to work with some text and so far no success at all. Given large string: abcdefghijkTHISISMYTEXTTOFINDlmnopqrstuvwxyz I want the text between THIS and FIND which could be anything like ISLJFKKDKLS It’s OK to include the THIS and FIND in my result. I’m th

Re: LC Player buffering data

2022-03-12 Thread panagiotis m via use-livecode
Hello Peter, Off the top of my head, I think there is a related read-only property ("loadState") but this is for the iOS mobile player. So you can get the value of this property using the mobileControlGet command, and start the video playback accordingly. However, if I remember correctly, your app