Get url "file:///..."

J. Landman Gay jacque at hyperactivesw.com
Tue Jun 21 13:07:14 EDT 2016


Once I have the source html, I let the engine extract the plain text for me:

set the htmltext of the templateField to tSource
put the text of the templateField into tText

Frequently that's all I need.


Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



On June 21, 2016 11:03:21 AM Jim Hurley <jhurley0305 at sbcglobal.net> wrote:

> Hi Klaus,
>
> Yes, that works well. Thank you.
> But it gives me the html source code.
> I can live with that, but lots of parsing to get the text
> You seem to suggest I can get the "text" or (?) or html "source"
> hh's script (below) does that but it is very unstable, crashing frequently
>
> Jim
>
>
> Klaus wrote:
>> Hi Jim,
>>
>> not sure I understand the problem, but this should give you the TEXT/source 
>> of that file:
>> ...
>> put url "file:/Users/jimhurley/Library/Mail 
>> Downloads/elec_web/precincts/241.htm" into tSource
>> ...
>
>
>
> put url "file:/Users/jimhurley/Library/Mail 
> Downloads/elec_web/precincts/241.htm" into msg box
> On Jun 21, 2016, at  3:00 AM, use-livecode-request at lists.runrev.com wrote:
>
>> Send use-livecode mailing list submissions to
>> 	use-livecode at lists.runrev.com
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	http://lists.runrev.com/mailman/listinfo/use-livecode
>> or, via email, send a message with subject or body 'help' to
>> 	use-livecode-request at lists.runrev.com
>>
>> You can reach the person managing the list at
>> 	use-livecode-owner at lists.runrev.com
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of use-livecode digest..."
>>
>>
>> you can find the archives for this list at:
>>
>> http://lists.runrev.com/pipermail/use-livecode/
>>
>> and search them using this link:
>>
>> http://www.google.com/advanced_search?q=site:lists.runrev.com
>>
>>
>> Message: 1
>> Date: Mon, 20 Jun 2016 22:06:41 -0700 (PDT)
>> From: "[-hh]" <hh at hh.on-rev.com>
>> To: use-revolution at lists.runrev.com
>> Subject: Re: Get url "file:///..."
>> Message-ID: <1466485601879-4706007.post at n4.nabble.com>
>> Content-Type: text/plain; charset=us-ascii
>>
>> Assuming you are on a Mac:
>> The following should work from 10.4 to 10.12 with LC 5/6/7/8.
>>
>> on mouseUp
>>  put "/Users/jimhurley/Library/Mail%20Downloads/elec_web/precincts/241.htm"
>> into f
>>  put "source" into sOrT --> one of "source", "text", "URL"
>>  do iScript(f, sOrT) as applescript
>>  put the result into fld 1
>> end mouseUp
>>
>> Using above "text" instead of "source" may save you some work.
>> (The LC interpretation as htmltext does the same but somehow 'uncomplete').
>>
>> function iScript f,x
>>  put numToChar(34) into q
>>  return "tell application " &  q&"Safari"&q  &cr& \
>>        "	open POSIX file " &  q&URLdecode(f)&q  &cr& \
>>        "	set rslt to " & x & " of document 1" &cr& \
>>        "end tell"
>> end iScript
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://runtime-revolution.278305.n4.nabble.com/Get-url-file-tp4705988p4706007.html
>> Sent from the Revolution - User mailing list archive at Nabble.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