Packages
Mark Smith
mark at maseurope.net
Tue Dec 11 14:11:52 EST 2007
Thanks, Ken! I had tried <packages of POSIX folder...>, but it didn't
work, of course. Can you recommend a good Applescript book? Not an
intro to scripting, but something fairly in-depth? If not, could you
write one? :)
Best,
Mark
On 11 Dec 2007, at 18:54, Ken Ray wrote:
> On Mon, 10 Dec 2007 11:31:17 +0000, Mark Smith wrote:
>
>> This is great! I couldn't find this anywhere. So here's a function
>> that uses it - maybe someone has better code for converting the path
>> to applescript.
>
> Well you can have AppleScript do it for you using "as POSIX file":
>
> function thePackages pFolder
> put "tell application" && quote & "Finder" & quote & cr & \
> "packages of folder (" && quote & pFolder & quote & \
> "as POSIX file)" & cr & "end tell" into tScr
>
> do tScr as applescript
> put the result into tList
> replace comma with cr in tList
>
> repeat for each line L in tList
> get wordoffset("file", L)
> put word it + 1 of L & cr after tPackages
> end repeat
> replace quote with empty in tPackages
> return char 1 to -2 of tPackages
> end thePackages
>
> Either way works...
>
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list