Mavericks 10.9.2 (don’t see that OS in drop-down menu for OS)
Lately many of my older InDesign scripts are broken in Mavericks.
I used to be able to just say:
tell application “Adobe InDesign CS6”
set theDocPath to (file path of document 1) as text
end tell
Now it fails.
Error seems to occur when I use a tell block for InDesign and want to do something that the Finder, System events or applescript itself can do, like coerce a file path into a string.
I did that partly for convenience and partly to avoid a lot of changing tell blocks, because changing the “tell” back and forth between InDesign and Applescript slows the script down (or used to)
Now it seems I must exit the tell block entirely before doing anything like coercing strings.
Why is that – something changed??
In the example below all of the commented-out syntax used to work , but not now.
I can’t even use “tell me” to jump out of the tell block anymore.
Even stranger, many scripts that I know have this structure do still run, but won’t compile anymore.
tell application "Adobe InDesign CS6"
--this worked in Mountain Lion, but not in Mavericks:
--set theDocPath to (file path of document 1) as text
--now I have to do this and then can't coerce to text
set theDocPath to (file path of document 1)
--set theDocPath to theDocPath as text
--set theDocPath to text items of theDocPath
--tell me to set theDocPath to theDocPath as text
--tell me to set theDocPath to text items of theDocPath
end tell
set theDocPath to theDocPath as text