I guess the issue might be that you are passing a string to indesign. You may prefer to set a file reference
tell application "Finder" set f to alias "Macintosh HD:Users:ozalto:Desktop:BLOG:StylesCloner:testStyles.indd" end tell tell application "Adobe InDesign CC 2017" set doc to open f end tell
I tried that previously and got the same result.
The code works no problem when running directly with InDesign (If I use either a string or a variable), its just when using InDesignServer that error comes up.
I got this message when I had both indesign server and indesign desktop opened with different versions. While I double clicked on the file and expected to be opened in the client, IDS took preceedence and claimed for that exact message. Closing IDS was the key but it's not really your issue obviously.
Is the file ok ? Which application are you targeting in the aps snippet ?
Could you share some code ?
On this particular mac, nothing else is installed except InDesign Server.
Here is some very basic code that im trying.
tell application "Finder"
set loc to alias "Macintosh HD:id:test.indd"
tell application "InDesignServer"
set mydoc to open loc
The .indd file opens no problem when I bring it over into InDesignCC.
I even had indesign server create its own file, and then tried opening that newly created file with the same results.
Im going to spin up a windows server on Ec2 and give that a try.
Using a Windows Server makes more sense if you need external users to get something out of IDS anyway.
However, let's try to nail it.
If IDS states it, it may mean that either :
a) the file is corrupted
b) The file is not a valid type
c) the file is somehow corrupted at the opening stage
d) the file is saved in a more recent version
But I would rely on IDS. I mean if there is a problem with the file, then there is one.
Obviously you could discard many of the options here so lets try two things:
1) Change class in the applescript command
set f to file "…"
set f to alias "…"
create a jsx file onto the desktop as test.jsx with the following contents
var doc = app.open ( File ( "/your/location" ) ); //beware of the url syntax here => /Users/[you]/… and not "Macintosh HD:…" doc.exportFile (ExportFormat.PDF_TYPE, File ( Folder.destop+"/foo.pdf" ) ); doc.close(SaveOptions.NO);
Then call it with the terminal
"/Applications/Adobe InDesign CC Server 2017/sampleclient" -host localhost:12345 "/Users/[user]/Desktop/test.jsx"
Given that you started the server on port 12345
If a PDF is created onto the desktop IDS is just fine with the file and it's all about Applescript (which I start to incriminate).
3) Check the url
Are you pointing a file located onto a mounted volume ? A network drive ? Something that may corrupt the opening process due to some possible latencies ?
I appreciate the reply.
The file is good as I had indesign server create it, I can open it using desktop CC etc.
"something weird happening with the applescript."
I am not really surprised