Batching InDesign CS2 files to create pdfs

Hello,
I have a script that takes quark files, opens them and makes PDF’s. I have been trying to get the same results by dragging inDesign CS2 documents on the script…But nothing has worked…here is the quark script…I already changed all the quark stuff to indesign and changed any of the menu terminology, but no go…so, I am posting the original…any guidance to making an InDesign file(s) do other same thing would be most appreciated…
thanks~!
barbara

on open (ItemList)
	repeat with thisItem in ItemList
		processfile(thisItem, "dropherehere")
	end repeat
end open

on processfile(myfile, mymethod)
	tell application "QuarkXPress"
		activate
		
		if mymethod = "drophere" then
			open file (myfile as string)
		end if
		
	end tell
	try
		tell application "System Events"
			tell process "QuarkXPress"
				tell menu bar 1
					tell menu bar item "File"
						tell menu "File"
							tell menu item "Export"
								keystroke return
								tell menu "Export"
									keystroke return
									
								end tell
							end tell
						end tell
					end tell
				end tell
				delay 5
				keystroke return
				keystroke return
				keystroke return
				
				tell window "Export as PDF"
					keystroke return
					
					click button "Save"
				end tell
			end tell
		end tell
		delay 5
	end try
	if mymethod = "drophere" then
		tell application "QuarkXPress"
			activate
			close document 1 saving no
		end tell
	end if
end processfile