Help with Droplet & Dialog box

I have written a script to change some Photos in PhotoShop. The Script works well but if I drop a Folder of Photos I get the final Dialog box twice? Can someone tell me why this is??

Here’s my code:

on run
	display dialog "To use this script, please drag files onto its Finder icon"
end run

on open myFinderList
	repeat with myFinderItem in myFinderList
		tell application "Finder" to set myItemIsFolder to (kind of myFinderItem = "folder")
		if myItemIsFolder then
			tell application "Finder" to set myFolderContents to (every item of myFinderItem)
			open myFolderContents
		else
			set theDay to the day of (current date)
			set theMonth to the month of (current date)
			set theDate to theDay & " " & theMonth
			set ConvertedFolder to (path to desktop folder) & "Converted " & theDate & ":" as string
			
			try
				get ConvertedFolder as alias
			on error
				tell application "Finder"
					set targetFolder to make new folder at (path to desktop folder) with properties {name:"Converted " & theDate}
				end tell
			end try
			
			with timeout of 864000 seconds
				tell application "Adobe Photoshop CS"
					set ConvertThis to open (myFinderItem as alias)
					set myDocumentName to "edit " & name of current document
					set myDocumentPath to ConvertedFolder & myDocumentName as string
					do action "Change Size" from "AppleScripts"
					save current document in myDocumentPath as JPEG with options {class:JPEG save options, quality:12}
					close current document
				end tell
			end timeout
			
		end if
	end repeat
	display dialog "All your Photos have been converted." buttons {"OK"} default button 1 with icon stop giving up after 10
end open

Thanks

Michel Lemieux on the Apple Discussions solved the problem with the following script:

on run
display dialog "To use this script, please drag files onto its Finder icon"
end run

on open myFinderList
repeat with myFinderItem in myFinderList
my Process_Item(myFinderItem as item)
end repeat
display dialog "All your Photos have been converted." buttons {"OK"} default button 1 with icon stop giving up after 10
end open

on Process_Item(ThisItem)
if folder of (info for ThisItem) then
my Process_Folder(ThisItem)
else
my Process_File(ThisItem)
end if
end Process_Item

on Process_Folder(ThisFolder)
tell application "Finder" to set FolderContents to every item of ThisFolder
repeat with ThisItem in FolderContents
my Process_Item(ThisItem as alias)
end repeat
end Process_Folder

on Process_File(ThisFile)
set theDay to the day of (current date)
set theMonth to the month of (current date)
set theDate to theDay & " " & theMonth
set ConvertedFolder to (path to desktop folder) & "Converted " & theDate & ":" as string
try
get ConvertedFolder as alias
on error
tell application "Finder"
set targetFolder to make new folder at (path to desktop folder) with properties {name:"Converted " & theDate}
end tell
end try
with timeout of 864000 seconds
tell application "Adobe Photoshop CS"
set ConvertThis to open ThisFile
set myDocumentName to "edit " & name of current document
set myDocumentPath to ConvertedFolder & myDocumentName as string
do action "Change Size" from "AppleScripts"
save current document in myDocumentPath as JPEG with options {class:JPEG save options, quality:12}
close current document
end tell
end timeout
end Process_File