Packages
Ken Ray
kray at sonsothunder.com
Tue Dec 11 13:54:32 EST 2007
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/
More information about the use-livecode
mailing list