hello all,
i had a script that checked a certain folder for JPEG images and then ataches them to an entourage mail message. now i also have in that folder thumbnails JPEG images that i don’t want them attachached with the message. i’m always sure that my thumbnail JPEGs’s names always contain “thumb” for example “test_thumb.jpg” i tried to edit my previous code but it’s not working whenever it reaches the point to attach the messages it gives me an error…
set theAttachment to "Mac HD:Resources"
--it's the folder where i have my pics
set theSubject to "this is a test subject"
set theBody to "this is a test body"
tell application "Finder"
	set theAttachments to files in alias theAttachment whose file type is "JPEG"
	repeat with i from 1 to count theAttachments
		set testthumb to (theAttachments's item i)
		set test to (name of testthumb)
		if not (test contains "thumb") then
			set theAttachments's item i to (theAttachments's item i) as alias
		end if
	end repeat
end tell
tell application "Microsoft Entourage"
	set newMessage to make new outgoing message at out box folder with properties {subject:theSubject, content:theBody, attachment:theAttachments}
end tell
i tried my best to figure out  what’s going on… but i didn’t…
can anyone help? this is an urgent matter
thanks,
psycho-ed