Hello all, I have an Acrobat 8 script that worked fine in OS X 10.4. Now that i have upgraded to 10.5 there seems to be an issue with the script. Everything works fine until it gets to the line “repeat until exists button Replace” . Once the {Cancel, Replace} buttons appear the script refuses to click the Replace button. Any suggestions or ideas? Thanks in advance.
set the_container to choose folder
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
activate application "Adobe Acrobat Professional"
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
activate application "Adobe Acrobat Professional"
tell application "System Events"
tell process "Acrobat"
click menu item "Enable Usage Rights in Adobe Reader..." of menu 1 of menu bar item "Advanced" of menu bar 1
tell window 1
repeat until exists button "Continue"
delay 0.25
end repeat
click button "Continue"
repeat until exists button "Save Now"
delay 0.25
end repeat
click button "Save Now"
repeat until exists button "Save"
delay 0.25
end repeat
click button "Save"
repeat until exists button "Replace"
delay 0.25
end repeat
click button "Replace"
end tell
close front document
end tell
end tell
end repeat
end tell