I’ve been reading the Adobe ID applescript guide, copied over relevant fragments, but I’m unable to do a simple attribute change. I believe I’m hitting the wrong thing. Here’s a relevant portion:
tell application "Adobe InDesign CS3"
tell document 1
tell text frame "bing"
set story1 to "This is my story"
set contents to story1 --> works
set myStory to parent story
tell myStory
set applied font to "Arial" --> fails here
end tell --myStory
end tell --bing
end tell --doc 1
end tell
Perhaps I’m telling the wrong item? but I’ve got to believe I’ve got to tell the story. It’s probably obvious to others, but not to me. Appreciate your feedback, thanx, sam
I didn’t have a text frame called “Bing”
but that was all that i changed in your script and it worked fine.
tell application "Adobe InDesign CS3"
tell document 1
tell text frame 1
set story1 to "This is my story"
set contents to story1 --> works
set myStory to parent story
tell myStory
set applied font to "Arial" --> fails here
end tell --myStory
end tell --bing
end tell --doc 1
end tell
Your question is not stupid, but valid. The reality is that I do have the font “Arial” available.
Since the snippet works, I should then turn to the document. While I had “Arial” installed, I had another text frame with a label named “bing”, which must have confused it. So it’s just as stupid. Thanks for helping me to isolate the issue, sam
tell application "Adobe InDesign CS4"
set story1 to "This is my story"
set contents of text frame 1 of document 1 to story1
set myStory to parent story of text frame 1 of document 1
set applied font of myStory to "Arial"
end tell