How to choose many file in dialogue box ?

This a little script to set the Creator type “CARO” (PDF’s Acrobat creator) to PDF.
(sorry for my english :wink: )

The second line open a dialogue box to select a PDF type file. But i want to be able to select many PDF files at the same level in one time.

Please how ??
I know the problem is at the second line… (set theFile to choose file with prompt…) but i dont know how ask for many files…

(When i drag’n drop many files on the application, its ok, the script run on all files selected)

Thanks very well for your help.

on run
set theFile to choose file with prompt “Choose PDF files” of type "PDF "
open {theFile}
end run
on open theFiles
if class of theFiles is not list then set theFiles to {theFiles}
repeat with aFile in theFiles
tell application “Finder”
get file type of aFile
if file type of aFile is "PDF " then
set creator type of aFile to “CARO”
display dialog “Your selection containt ¬
other format than PDF” buttons {“Ok i take care”} ¬
default button 1 with icon 1
end if
end tell
end repeat
end open

set theFile to choose file with prompt "Choose PDF files" of type "PDF "  with multiple selections allowed

This will return a list of aliases to all of the files chosen. Note that you have to hold the shift or command key while selecting more than one file.


Wow its quick !!!

Thank you very well