Applescript not compiling after upgrade to snow leopard. Please help.

Hi all I have no problem compiling this script in leopard but when I try it in snow leopard it no longer works. Can anybody shed some light on why this is.

The script editor doesn’t like the syntax of this line

find matching theQuery

Thanks


on run {input, parameters}
	get input as list
	set productSkus to input
	
	
	tell application "Portfolio"
		activate
		
		set theQuery to "filename" & tab & "contains" & tab & (item 1 of productSkus) & return & "or" & tab & "filename" & tab & "contains" & tab & (item 2 of productSkus) & return & "or" & tab & "filename" & tab & "contains" & tab & (item 3 of productSkus) & return & "or" & tab & "filename" & tab & "contains" & tab & (item 4 of productSkus) & return & "or" & tab & "filename" & tab & "contains" & tab & (item 5 of productSkus) & return & "or" & tab & "filename" & tab & "contains" & tab & (item 6 of productSkus) & return & "or" & tab & "filename" & tab & "contains" & tab & (item 7 of productSkus) & return & "or" & tab & "filename" & tab & "contains" & tab & (item 8 of productSkus) & return & "or" & tab & "filename" & tab & "contains" & tab & (item 9 of productSkus) & return & "or" & tab & "filename" & tab & "contains" & tab & (item 10 of productSkus)
		find matching theQuery
		tell document 1
			find matching theQuery
			-- optionally sort the result - note sort is gallery based
			tell gallery "Find Results" to sort by "Filename" order ascending
		end tell
	end tell
end run

Hi. I have no experience with “Portfolio”, however, I see that the statement you say is the problem appears twice, once within and once without the document block. Have you tried disabling one of those?

Thanks Marc,

I tried that but it still doesn’t compile. I forgot to mention that both Portfolio and Leopard were updated at the same time. When we upgraded to snow Leopard, Portfolio wouldn’t work so we updated Portfolio 8.5.5. Seems like I’m not the only one having issues with spotty applescript support from Portfolio.