I'm trying to bypass prompting. This is a piece of "my" code:
tell application "Finder"
set folderA4 to choose folder with prompt "Please select the Folder with A4-booklets"
set allFiles to every file of folderA4
set listCount to count every item of allFiles
end tell
tell application "Adobe InDesign CS6"
repeat with i from 1 to listCount
set myDocument to make document
set myPDF to choose file
...
Later on I need to place this file in InDesign:
tell myPage
set myPDFPage to place myPDF
set myPDFPage to item 1 of myPDFPag
end tell
But I don't want to choose the file manually but automatically in this manner:
tell application "Adobe InDesign CS6"
repeat with i from 1 to listCount
set myDocument to make document
set myPDF to item i of folderA4
So that all the pdf files of folderA4 get chosen automatically...
This however brings an error saying the alias of item 1 cannot be requested. (number -1728)
What am I doing wrong?
Thanks in advance!