set someFolder to ((path to desktop as text) & "a folder:") as alias
set list_1 to {1, 2, 3, 4, 5}
set list_2 to {}
repeat with nn in list_1
set list_2 to list_2 & nn
end repeat
--> list_2 = {1,2,3,4,5} -- Yes!
tell application "Finder"
set list_3 to files of folder someFolder
--> list_3 = {file 1,file 2, file 3}
set list_4 to {}
repeat with nn in list_3
set list_4 to list_4 & {contents of nn}
end repeat
(*
--> list_4 = {item 1 of {file 1,file 2, file 3}, item 2 of {file 1,file 2, file 3}, item 3 of {file 1,file 2, file 3}} -- NO!
-- This works but it's ugly
set list_4 to {}
repeat with nn from 1 to (count of list_3)
set list_4 to list_4 & {item nn of list_3}
end repeat
--> list_4 = {file 1,file 2, file 3}
*)
end tell
Yvan KOENIG (VALLAURIS, France) lundi 23 février 2015 23:21:57