Article View: adobe.scripting.indesign
Article #793[AS] saving, different name, different location
From: KEVINP1
Date: Tue, 03 Mar 2009 23:36
Date: Tue, 03 Mar 2009 23:36
44 lines
2277 bytes
2277 bytes
Hi
I have a Indesign CS3 file saved as a template, what I am trying to do is save the template as a document in a different place with a different name.
I have the below which works fine, but I have to paste the file name into the text field (which is stored on the clipboard) thrown via the prompt "save document 1 to (choose file name)", and manually choose a destination to save to.
I have the name of the new file, I have a new location for the file, but I am uncertain as
to how to go about executing a script to do what I am seeking, any help appreciated please.
-----------------------
tell application "Adobe InDesign CS3"
activate
set myDoc to active document
set Doc_Width to page width of document preferences of myDoc
set Doc_Height to page height of document preferences of myDoc
set _W to round {(Doc_Width)} as number
set _X to result
set _Y to round {(Doc_Height)} as number
set _Z to result
-------------
if (_Z is "241" as number) and (_X is "311" as number) then
set _H to "H"
-------------
end if
end tell
set _folders to (folders of desktop whose name begins with "Q")
repeat with _folder in _folders
set _Name to name of _folder
count words of _Name
if the result is 2 then
set _NewName to (text 2 thru 7 of _Name) & (text 9 thru -1 of _Name)
else
set _NewName to (text 2 thru -1 of _Name)
end if
end repeat
set the clipboard to _NewName & "-" & _H as string
tell application "Adobe InDesign CS3"
save document 1 to (choose file name)
end tell
end tell
------------------------
Kev
Technical Details
Message-ID:
<59b81b1a.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,d4501fe82e27b313,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: KEVINP1@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: [AS] saving, different name, different location Message-ID: <59b81b1a.-1@webcrossing.la2eafNXanI> Date: Tue, 3 Mar 2009 15:36:22 -0800 Lines: 52 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit