export a list from the third Subroutine

hi,
i want a way to export/save a list created in a nested repeat-routine.
My script looks like:

set tag_ls to ()

repeat with i in x
repeat with i in sx
repeat with i in dx
set my_tag to alias (i as text)
copy my_tag to end of tag_ls
end repeat
end repeat
end repeat

here should begin the routine to clean up items added to my tag_ls, like:

repeat with i in tag_ls

end

suggestions? elsewhere i’ve to rewrite the concept of this step.Thanks for any suggestion.

I think this is what your looking for but I’m not certain … this will loop through 3d list copying the third dimension to a new list


set tag_ls to {}

repeat with i in x
	repeat with j in i
		repeat with k in j
			copy j to end of tag_ls
		end repeat
	end repeat
end repeat

repeat anitem in tag_ls times
	
end repeat

I hope this helps
mm

hi mcgrailm,

No results, unfortunately. My repeat-handlers aren’t connected between, they comunicate yes, but not directly;
in short:

set the_clip to {}

repeat with i in alias yx
	set these_items to alias (i as text)
	repeat with ix from 1 to count of items in the_pool
		repeat with ff from 1 to count of words in nm_of
			set my_file to (these_items as text)
			display dialog my_file
			copy my_file to end of the_clip
		end repeat
	end repeat
end repeat

if the_clip is not {} then
	repeat ii in the_clip times
		set the_file_x to alias (ii as text)
		move the_file_x to alias b_pt
	end repeat
end if


first i collect data copying these into a list called the_clip, because i would get an error moving data during this process; so i solve this in a 2nd separat handler which moves all my data without any error messages.
i don’t know how exporting this list, perhaps creating a text-file in the tmp-path?
a bit clumpsy…
help!