How can I make my script bypass Acrobat 8 PDFs that have been enabled?

My script works fine on PDFs that have not been enabled for markup by acrobat reader. How do I get the script to continue once it encounters an ad already enabled? Thanks for all the help in advance.

set the_container to choose folder

if (count of items in the_container) is greater than 1 then

tell me to activate

end if
tell application “Finder”
try
set fileNameList to (every file in entire contents of the_container whose name ends with “.pdf”) as alias list
on error
set fileNameList to (every file in entire contents of the_container whose name ends with “.pdf”) as alias as list
end try
end tell

tell application “Adobe Acrobat Professional”
activate

tell application "Adobe Acrobat Professional"
	repeat with iFile from 1 to count fileNameList
		set thisFilePath to item iFile of fileNameList
		set thisFilePath to thisFilePath as string
		open file thisFilePath
		
		tell application "System Events"
			tell process "Acrobat"
				delay 0.25
				click menu item "Enable Usage Rights in Adobe Reader..." of menu 1 of menu bar item "Advanced" of menu bar 1
				delay 0.25
				keystroke return
				delay 0.25
				keystroke return
				delay 0.5
				
				tell window 1
					repeat until exists button "Replace" of sheet 1
						delay 0.25
					end repeat
					click button "Replace" of sheet 1
					tell application "Adobe Acrobat Professional"
						close last document
						
					end tell
				end tell
			end tell
		end tell
	end repeat
end tell

end tell

It is my understanding that when you “Enable Usage Rights in Adobe Reader…” that the PDF document has some of its features disabled. Some of these are under advanced menu JavaScript & Forms for example. This worked for me with a quick test in V7 so you would have to check the menu objects as these move regular between Acrobat versions plus you can add your own. If the doc is enabled then only debugger should be available. The same features are switched off to JavaScript too so you could look at the ref and try a do script. As you are using GUI scripting and my JavaScript hasn’t got as good as poor yet I tried this.

tell application "Adobe Acrobat 7.0 Professional"
	activate
	tell active doc
		tell application "System Events"
			tell process "Acrobat"
				try
					set a to value of attribute "AXEnabled" of menu item "Edit All JavaScripts..." of menu 1 of menu item "JavaScript" of menu 1 of menu bar item "Advanced" of menu bar 1
					if a = true then
						display dialog "It is NOT reader friendly."
					else
						display dialog "It is reader friendly."
					end if
				end try
			end tell
		end tell
	end tell
end tell