Re: Passing argumenst to C executable from Apple script
Re: Passing argumenst to C executable from Apple script
- Subject: Re: Passing argumenst to C executable from Apple script
- From: Philip Aker <email@hidden>
- Date: Fri, 18 Apr 2008 14:49:01 -0700
On 08-04-18, at 14:00, Mark J. Reed wrote:
While on the subject, is there a simple way, given an alias or a file object, to get its containing folder as the same sort of object, without having to do text item splitting on the pathname or whatever?
Not really. info for, doesn't provide the container, and alias as a class has no properties. Shame.
set ptd to path to desktop folder
tell application "Finder" to container of ptd as alias
Hm. Wonder how expensive that round trip to the Finder is, compared to some all-in-process list-and-string manipulation? At least we can be pretty sure that it's already running...
Well you could probably do something similar with System Events, or rely on:
set ptd to POSIX path of (path to desktop folder) set dir to POSIX file (do shell script "dirname " & quoted form of ptd)
|
_______________________________________________
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