Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Cannot save "Untitled-4" under a new name.

New Here ,
Sep 18, 2007 Sep 18, 2007
I'm getting this error trying to run the HelloWorld.jsx Script on a Windows Server 2003 VM machine inside OSX.

I've been working with the server with no problems, having been able to test scripts to import XML, and export in various formats..

I had just written a Windows App test client in C# .Net, the aim being to develop an Object Pool to control multiple instances, and was going to use HelloWorld as the test script... and now this.

The same script runs perfectly well from the ActionScript IDE, both in the Windows Server and on OSX.

InDesign Server is running as a Windows Service.
I can view the WSDL on http://localhost:1978/?wsdl ... fine.

Any ideas?
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 18, 2007 Sep 18, 2007
You may as well see the script

//HelloWorld.jsx
//Create a new document.
var myDocument = app.documents.add();
//Get a reference to the first page.
var myPage = myDocument.pages.item(0);
//Create a text frame.
var myTextFrame = myPage.textFrames.add();
//Specify the size and shape of the text frame.
myTextFrame.geometricBounds = ["6p0", "6p0", "18p0", "18p0"];
//Enter text in the text frame.
myTextFrame.contents = "Hello World!";
//Save the document (fill in a valid file path).
//If the active document has not been saved (ever), save it.

//If you do not provide a file name, InDesign displays the Save dialog box.
app.documents.item(0).save(new File("/c/myTestDocument.indd"));

//Close the document.
app.documents.item(0).close();
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 22, 2007 Sep 22, 2007
Very useful forum this... very useful.. .
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2007 Nov 29, 2007
Try saving and closing in one step:

app.documents.item(0).close(SaveOptions.yes,new File(/c/myTestDocument.indd"));
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 05, 2007 Dec 05, 2007
LATEST
Hi Calvin,

I get this error message when I try to save the file into a directory where I have no write permission. Can this be your problem?

Tino
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines