Can someone correct this code it is not working!

try
set the this_folder to (choose folder with prompt “Please select the folder which contains the Indesign files to convert”)
set the open_folder to the POSIX path of this_folder
on error
set the this_folder to path to desktop as alias
end try
tell application “Finder” to set the_files to every file of the this_folder whose name extension is “qxp”
repeat with oneFile in the_files
tell application “System Events”
tell process “QuarkXPress”
delay 5
tell application “QuicKeys”
play shortcut named “ID2Q Open”
quit
end tell
end tell
tell window “Convert InDesign® Document”
keystroke “G” using {command down, shift down}
repeat until exists sheet 1
delay 0.5
end repeat
tell sheet 1
keystroke open_folder
delay 4
end tell
end tell
end tell
end repeat

David, you ask to choose folder of InDesign files then ask finder to make a list of files whose extension is .qxp? You are filtering QuarkXPress files if there are none in there nothing will happen. Don’t you want “indd” instead?

Sorry that was my mistake ha ha

however when I use indd extension the code does not work.

thanks 4 the help!