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

Mike Bonner bonnmike at gmail.com
Mon Jun 20 22:05:13 EDT 2016


Strange.  So, this sequence doesn't work?

If you do this..

get url
urldecode("file:/Users/jimHurley/Library/Mail%20Downloads/elec_web/precincts/241.htm)")
put the result && it

(on windows this works for me: get url
urldecode("file:/Users/Mike/Desktop/test%20me/steering.txt"); put it && the
result )


If it works the result will be empty and you'll see the contents of the
file.

If it doesn't work, hopefully the result will show the error.


Did you try setting the folder method?

set the folder to
urldecode("/Users/jimHurley/Library/Mail%20Downloads/elec_web/precincts")
get url "file:241.htm"
put the result && it

(on windows this works for me: get url
urldecode("file:/Users/Mike/Desktop/test%20me/steering.txt"); put it && the
result )


I"m starting to wonder.. Did you copy and paste in the path? If so, maybe
something got lost in translation.  (I've seen a few instances where
pasting things into the script editor broke it in a big way)

Another question.. the elec_web folder.. Is it a local folder, or a network
share mapped to a directory?

On Mon, Jun 20, 2016 at 7:37 PM, Jim Hurley <jhurley0305 at sbcglobal.net>
wrote:

> Thanks for all the suggestions. So far no luck with any.
>
> No combination of back slashes work, and urlDecode() simply returns the
> file name.
>
> Sarfari opens the file with no difficulty.
>
> Apparently Sarfari does something that LiveCode's  "get Url" doesn't.
>
> Jim
>
> > Dar Scott wrote:
> >
> > Yeah, checking 'the result' sounds like a good idea.
> >
> > I don't have a problem with ///, though, on my macOS (as we say instead
> of OS X these days).  Maybe that part depends on the OS.
> >
> > I have a feeling that we might be missing the core of the problem.
> >
>
> > On Jun 20, 2016, at 6:39 PM, Mike Bonner <bonnmike at gmail.com> wrote:
> >
> > Ah. A combination of both.  get url urldecode(" file:/Users/jimhurley/
> > Library/Mail%20Downloads/elec_web/precincts/241.htm")  Still need to get
> > rid of the extra //.  If you check the result on fail it'll probably say
> > "can't open file". You'll need to urldecode to set the folder too if you
> > decide to go that way.
> >
> > On Mon, Jun 20, 2016 at 6:23 PM, Dar Scott <dsc at swcp.com> wrote:
> >
> >> urlDecode() ?
> >>
> >>> On Jun 20, 2016, at 5:54 PM, Jim Hurley <jhurley0305 at sbcglobal.net>
> >> wrote:
> >>>
> >>> I got this web page address from the county election's office:
> >>>
> >>>
> >>
> file:///Users/jimhurley/Library/Mail%20Downloads/elec_web/precincts/241.htm
> >>>
> >>> It opens when I paste  it into the address field in Safari.
> >>>
> >>> But
> >>>
> >>>  get url
> >>
> "file:///Users/jimhurley/Library/Mail%20Downloads/elec_web/precincts/241.htm"
> >>>
> >>> in Live Code leaves "it" empty.
> >>>
> >>> I need to get the source code (programmatically) so that I may parse
> >> "it" for voter results.
> >>>
> >>> Is there something I can do to the address that would make it
> acceptable
> >> to LiveCode's: get url
> >>>
> >>> Jim
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> 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
> >>
> _______________________________________________
> 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