yet another list q :/

Sorry but me and lists are not the best mix



repeat with a from 0 to searchPages
	set countItem to a
	try
		set updateList to paragraphs of (do shell script "curl --silent [url=http://domain.com/search/]http://domain.com/search/"[/url] & searchCat & "/" & countItem & "/" & seedterm & " | grep \"<td align=\" | sed 's/<td align=\"right\">//' | sed 's/<\\/td>//'")
	end try
	set end of outputList to contents of updateList
end repeat


wich gives me this output

“582.96 MiB
113
44
3.47 MiB
108
1
518.86 MiB
107
45”

but im getting this error:

“Can’t set end of "" to {"582.96 MiB", "113", "44", "3.47 MiB", "108", "1", "518.86 MiB", "107", "45"}.”

You are trying to use end with a string, which doesn’t work.

uhm… okay…

using this only gets the last list of items

repeat with a from 0 to searchPages
	set countItem to a
	try
		set updateList to paragraphs of (do shell script "curl --silent [url=http://domain.com/search/]http://domain.com/search/"[/url] & searchCat & "/" & countItem & "/" & seedterm & " | grep \"<td align=\" | sed 's/<td align=\"right\">//' | sed 's/<\\/td>//'")
	end try
	set updateList to updateList as list
	tell a to set seedList to contents of updateList
end repeat

hmm…

That’s pointless; paragraphs will always return a list.

Also, it seems that if your shell script has an error, then updateList will either be undefined or have the same value as the previous loop.

You’re changing the value during each loop.

Also, that tell a part seems pointless.

Try something like this:

set searchPages to 5
set outputList to {}

repeat with i from 0 to searchPages
	try
		do shell script "echo " & quoted form of (i as text) -- example
		
		repeat with thisItem in paragraphs of result
			set end of outputList to contents of thisItem
		end repeat
	end try
end repeat

outputList

Bruce thanks for all your help, this ha given me something to play with, im not quite there yet
but thanks alot…