Hello there,
I’m running a Applescript (a part of it is below) which does a number of things.
The part what I can’t figure out is the following.
After the Indesign-file (CS5) is opened and the word-file is imported in de textframe ‘artikel’ I need to run a jscript which is in Indesign in the scriptpanel called “preptext.jsx”.
When I run this script manually it is necessary to put the cursor in the textframe (called artikel).
How do I do that in the applescript?
Furthermore I keep on getting a error on the jscript-path. (file not found).
I checked the path numerous times but it’s correct, or does the single quote in “Programma’s” fucks it up?
Maybe one of you genius can give me a hand with this.
Thanks in advance.
Erwin
===============================================
tell application "Adobe InDesign CS5"
set user interaction level of script preferences to never interact
set myDocument to open templatePath
set myPage to page 1 of myDocument
-- search textframe with label 'artikel'
repeat with i from 1 to count of page items of myPage
if label of page item i of myPage is "artikel" then
set myTextFrame to page item i of myPage
exit repeat
end if
end repeat
tell insertion point -1 of myTextFrame
place importFile without showing options
end tell
tell myTextFrame to activate
set aScriptPath to "Macintosh PPMG:Programma's:Adobe InDesign CS5:Scripts:Scripts Panel:preptext.jsx" as alias
tell application "Adobe InDesign CS5"
do script aScriptPath language javascript
end tell
end tell