Thursday, September 20, 2018

#1 2018-09-13 04:25:17 am

Joy
Member
From:: South Tirol
Registered: 2008-07-04
Posts: 569
Website

Convert hfs to uri path

I was wondering to find no relevant topics online,
about how to convert hfs paths into an uri paths.
Ideally I look for a code wrap to insert paths as links in applications which support this features, of course.
Thanks for any suggestion

Offline

 

#2 2018-09-13 05:32:13 am

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5448

Re: Convert hfs to uri path

You can use System Events:

Applescript:

set aFile to path to desktop
tell application id "com.apple.systemevents" -- System Events.app
   set theURI to URL of aFile
end tell


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

#3 2018-09-15 08:39:09 am

Frankv
Member
From:: Amsterdam, NL
Registered: 2017-09-11
Posts: 6

Re: Convert hfs to uri path

You can also use the Finder for this.

Applescript:

set aFile to path to desktop
tell application "Finder" to set theURI to URL of item aFile

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)