Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting colon delimited path from POSIX path



At 1:10 am -0800 31/10/02, Paul Berkowitz wrote:

> POSIX file "/some/path"

will give you an AppleScript file. In fact, if you use an actual hardcoded
path, rather than a variable, it compiles with colons as you compile it.

But - if there are spaces in the path - you can't use 'quoted form' of the
POSIX path with single quotes, you need to \" escape-quote the path.


I don't see quite what you're getting at. Why _would_ anyone go to the unnecessary trouble of using 'quoted path' in this case?

I'd say it's best always to put the POSIX path into a variable in order to avoid the thing resolving on compilation, just as it is with date things.


tell app "TextEdit" to set pathPos to path of front document
set pathMac to POSIX file pathPos as alias
JJJJJJ
set pathPos to "/Users/jd/Documents/Hello World.rev"
set pathMac to POSIX file pathPos as alias
JJJJJJ
set dString to "31 Oct 03"
set d to date dString

-- JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: getting colon delimited path from POSIX path (From: Paul Berkowitz <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.