Find all links in fld

Shawn Blc shawnlivecode at gmail.com
Fri Jan 16 17:29:29 EST 2015


Here's what I ended up with , with the extra php file (one for the rss, one
to clean up the html a bit [that file was 13 lines long]).  Total lines =
20 lines.

on mouseUp
   set the itemDelimiter to "<br />"
   put URL "http://mydomain.com/cleanHTML.php" into tURL
   put tURL into fld "fld4"
   replace "<br />" with return in fld "fld4"
   put any line of fld "fld4" into fld "fld3"
end mouseUp



Here's with just the original php file for the rss.  No extra php file and
only 12 lines of LC.

on mouseUp
   put URL "http://mydomain.com/rss.php" into fld "fld1"
   put text of fld "fld1" into tText
   replace CR with space in tText
   replace quote with space in tText
   replace "https://www.mydomain.com/show.php?l=0&p=0056&i=" with
("--myTag--" & "https://www.mydomain.com/show.php?l=0&p=0056&i=") in tText
   replace space with CR in tText
   replace "--myTag--" with CR in tText
   filter tText with "https://www.mydomain.com/show.php?l=0&p=0056&i=" & "*"
   put tText into fld "fld4" -- should be a list of URLs
   put any line of fld "fld4" into fld "fld3"
end mouseUp

Thanks everyone for your input and helping this ole guy.  Off to try
another way now :)

On Fri, Jan 16, 2015 at 4:16 PM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:

> On 1/16/2015 4:09 PM, Shawn Blc wrote:
>
>> Phil that was the one that worked like I was hoping.   Thanks John and
>> Phil!   Don't need the extra Php file now!
>>
>
> Here's another way:
>
> on mouseUp
>   put fld 1 into tText
>   put 0 into tSkip
>   repeat
>     get offset("https://www.domainb.com/",tText,tSkip)
>     if it > 0 then
>       put the number of words in char 1 to (it + tSkip) of tText into
> tWordNum
>       put word tWordNum of tText & cr after tList
>       add it to tSkip
>     else
>       exit repeat
>     end if
>   end repeat
> end mouseUp
>
> Lots of ways to do stuff in LC.
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list