views:

160

answers:

3

Hello, I'm using a Objective-C Scripting Bridge to communicate with InDesign CS3/CS4. Unfortunately I'm stuck on Save command which appears to be existing only as a part of the standard suite and not defined again in InDesign. Because of that it looks like I can Save, Save as but not Save Copy a document. Does anyone have any idea how to proceed?

Just to shortly explain the difference between Save and Save Copy - using Save Copy the current doc doesn't change which is opposite to Save or Save as.

A: 

I always thought the distinction between Save As and Save Copy as being more semantic than anything because all that command is really doing is performing a Save As but appending the file name with " copy" (e.g., "MyLayout.indd" becomes "MyLayout copy.indd"). Just use Save as a Save Copy alternative by giving an alternate name for the document when you save it.

Edit per OP's comments: You're right that Save Copy isn't defined in the dictionary. The only way I see around this is to mimic the command's behavior by saving to a location with a new name, closing the current-yet-renamed document, and reopening the original. Not ideal, I know, but I don't see another way around it, unless Save Copy is defined in the Javascript API, which I doubt.

Philip Regan
Nope, there is a difference in both. Let's say you have a document named "Layout1" open and are working on it. When you use Save As command, the application will ask you for a new name, saves the document and leaves it open. Your current doc becomes the newly saved file.When you choose Save Copy, the dialog will let you name it, save it under new name but "Layout1" remains the current doc.
BobC
Ah, you're right. Forgot about that bit. I never really saw the point, but to each their own. I'll edit my answer.
Philip Regan
+1  A: 

the only other alternative other than that which philip-regan suggests. Would be to use GUI scripting but I'm still not sure what the point would be. If you wanted to save time of not closing and reopening you could save the doc make a duplicate via the finder and continue onward in indesgn with out the close and re-open bit

mcgrailm
A: 

Well, since Save Copy is not defined in the scripting dictionary, the only way how to proceed is to save current document a create a copy via Finder.

BobC
no offense to you or philip but isn't what you just said here what I just said 11 hrs before you and how does he get the credit for the answer when I told you want you should do ?
mcgrailm
My bad. Added credit to you as well.
BobC
just fyi you an accept from two answers I didn't expect you to change it I was just curious
mcgrailm