Packages
Kay C Lan
lan.kc.macmail at gmail.com
Mon Dec 10 08:44:10 EST 2007
On Dec 10, 2007 7:31 PM, Mark Smith <mark at maseurope.net> wrote:
> This is great! I couldn't find this anywhere. So here's a function
> that uses it
Man, that was quick.
> maybe someone has better code for converting the path
> to applescript.
>
That I can do
>
> function thePackages pFolder
>
-- Automatically converts Rev paths to applescript paths
put revMacFromUnixPath(pFolder) into pFolder
put "tell application" && quote & "Finder" & quote & cr &
> "packages of folder" && quote \
> & pFolder & quote & 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
>
Thanks
More information about the use-livecode
mailing list