Convert Path strings to POSIX strings

J. Landman Gay jacque at hyperactivesw.com
Mon Nov 18 14:59:17 EST 2013


On 11/18/13 1:32 PM, Brahmanathswami wrote:
> Those functions only deal with colons --> slashes and back
>
> But I was looking to auto escape "bad chars" for Javascript
>
> This apple script works:
>
> get POSIX path of "/Volumes/Varuna/Art Storage/*Archives/Other art/Lotus
> /Google Image Result for
> http___f33.yahoofs.com_mapann_1000_sr_22692099138f2f.jpg%3Flc_____DWcnzQJ1P.jpg"
>
>
>
> but my result is not what I expected: it is unchanged.
>
> the *Asterisk and the percent sign in  the path are unchanged.
> I thought POSIX conversion would do something with those, but it doesn't.

It was my understanding that LiveCode's path references are already 
POSIX paths. Applescript needs colons, LiveCode uses slashes, which is 
the primary difference. POSIX uses the unix slash convention.

If the path has spaces in it, you need to escape those, or else quote 
the entire path. But otherwise I think you already have what you need.

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




More information about the Use-livecode mailing list