• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Converting Unix path to AppleScript path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting Unix path to AppleScript path


  • Subject: Re: Converting Unix path to AppleScript path
  • From: Martin Orpen <email@hidden>
  • Date: Wed, 29 Mar 2006 13:19:25 +0100

On 29 Mar 2006, at 12:57, has wrote:

Or, if you're not afraid of a bit of C, you could write a 10-line scripting addition that uses a couple of Core Foundation calls to convert the URL into a POSIX path.

You don't need to go to that much trouble to use obj-c:


objcString("file:///Volumes/Mag_Production/Color Lab Images/03:26/ Issue #9 prepressed/tm.0326.chinaRS.tiff")


on objcString(theString)
tell application "Automator"
set objcString to call method "stringWithString:" of class "NSString" with parameter theString
set myEscapedURL to call method "stringByReplacingPercentEscapesUsingEncoding:" of objcString
end tell
end objcString


-->"file:///Volumes/Mag_Production/Color Lab Images/03:26/Issue #9 prepressed/tm.0326.chinaRS.tiff"


From an example at my site: <http://www.idea-digital.com/applescript/objc/page23/nsstring.html>

Regards

--
Martin Orpen
Idea Digital Imaging Ltd

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >RE: Converting Unix path to AppleScript path (From: has <email@hidden>)

  • Prev by Date: RE: Converting Unix path to AppleScript path
  • Next by Date: With Transaction in FileMaker Pro
  • Previous by thread: RE: Converting Unix path to AppleScript path
  • Next by thread: Re: Converting Unix path to AppleScript path
  • Index(es):
    • Date
    • Thread