Re: Finder "duplicate" requirements
Re: Finder "duplicate" requirements
- Subject: Re: Finder "duplicate" requirements
- From: Christopher Stone <email@hidden>
- Date: Sun, 28 Jun 2015 03:27:08 -0500
On Jun 28, 2015, at 02:14, Shane Stanley < email@hidden> wrote: It's a common problem in Xcode-based apps, but I haven't noticed it in standard AppleScript before.
______________________________________________________________________
Hey Shane,
You mean in the Finder?
We've discussed this before, but it's been awhile.
This is on OSX 10.9.5.
The finicky nature of what can coerce where is why I still stick to HFS-Paths and Aliases wherever possible.
-- Take Care, Chris
-------------------------------------------------------------------------------------------
tell application "System Events" to set posixPath to POSIX path of disk item "~/test_directory/test"
tell application "Finder"
exists POSIX file "/Users/chris/test_directory/test" --> true
exists POSIX file posixPath --> false
exists alias posixPath --> false
exists posixPath as «class furl» as alias --> true
exists posixPath as «class furl» --> true
exists file posixPath --> false
exists (get POSIX file "/Users/chris/test_directory/test") --> true
exists posixPath as POSIX file --> true
exists (get POSIX file posixPath) --> Finder got an error: Can’t get POSIX file "/Users/chris/test_directory/test".
end tell
-------------------------------------------------------------------------------------------
tell application "System Events" set posixPath to POSIX path of disk item "~/test_directory/test"
exists POSIX file "/Users/chris/test_directory/test" --> true
exists (get POSIX file "/Users/chris/test_directory/test") --> true
exists alias posixPath --> true
exists file posixPath --> true
exists posixPath as POSIX file --> true
exists POSIX file posixPath --> System Events got an error: Can’t get POSIX file "/Users/chris/test_directory/test".
exists (get POSIX file posixPath) --> System Events got an error: Can’t get POSIX file "/Users/chris/test_directory/test".
end tell
-------------------------------------------------------------------------------------------
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden