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

Dar Scott dsc at swcp.com
Mon Jun 20 22:04:30 EDT 2016


I think urlDecode() should convert the %20 to a space.   I don't think it would do more to the path you mentioned.  

You can check whether 'the result' is something other than "can't open file".  

You might try saving the attachment to another location and getting it from there.

You might try putting an 'answer file' just before the get to obtain the path.  

You might want to get rid of any control characters that got caught in the string as you did a copy and paste.  

Obviously, I'm running out of ideas and am babbling.  



> On 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