Please use this code:
1 person found this helpful
Bill joy wrote:
Is it Script proble or InDesign problem
MAC OSX problem ?
I think it is your path problem. (Are you able to save this file in UI there?)
mFile = new File("/var/New.indd"); mFile.isValid;
You can't go forward until above == true;
You could check how your system records a path using this in ESTK:
mFile = File.saveDialog();
select any file and check ESTK console.
Script is creating a new File object with path you can see (not saving anything), so do it same way.
If you will pass above with true save a doc using:
Thanks For Reply
Thanks Jarek for reply
Also thenks to Beginner_X
I found the MAC OSX permission problem.
If i use
Then Script run successfully run and save "Untitle1.indd" file at location
/Applicaion/NewFolder/ with name "New.indd".
But if i use "/var/" path to save the file then it give error
can not save "untitle1.indd" under a new name
I think it is MAC OSX permission problem.
How solve this MAC OSX permission problem that I save my document file at any location on my MAC system using script