File lists
Richard Gaskin
ambassador at fourthworld.com
Fri Jul 16 10:49:47 EDT 2010
Medard wrote:
> I thinks it's better now:
>
> on mouseUp
> answer folder "List files in folder:"
> if it is empty then exit mouseup
> replace slash with colon in it -- mandatory!
> put "iMacIntel" before it
> -- the name of the Mac, besides the old G5 ;-)
> put it into tfolder
> put "tell Application" && quote & Finder & quote into tcommande
> put cr & "files of folder" && quote & tfolder & quote & "as text"
> after tcommande
> put cr & "end tell" after tcommande
> do tcommande as applescript
> get the result
> -- no error treatment for now;
> -- AS places the result... in "the result" variable!
> replace tfolder & colon with cr in it -- some cleaning
> delete line 1 of it
> put it into field ffiles
> end mouseUp
>
>
> Quick and dirty ;-)
I think I missed something earlier in this thread - why not use
RevTalk's "files" function?:
function FileList pFolder
put the directory into tSaveDir
set the directory to pFolder
get the files
set the directory to tSaveDir
return it
end FileList
--
Richard Gaskin
Fourth World
Rev training and consulting: http://www.fourthworld.com
Webzine for Rev developers: http://www.revjournal.com
revJournal blog: http://revjournal.com/blog.irv
More information about the use-livecode
mailing list