Article View: adobe.scripting.indesign
Article #9280(JS)(CS2) Taking Part of a String Variable
From: D_Scott_Chinn
Date: Thu, 24 Aug 2006 18:42
Date: Thu, 24 Aug 2006 18:42
13 lines
1288 bytes
1288 bytes
Is there a way to take a variable and only use X number of it's characters?? var myDocument = app.activeDocument; var myDocumentName = myDocument.name; I would like trim down myDocument.name or in other words only allow it to read the first 7 characters of myDocument.name The file naming convention being used at my work is way too lengthy : 00525-6_022-023.indd My script, upon exporting a file, already inserts the page number per exported page and the extension .indd just gets in the way! Any help would greatly be appreciated! After perusing the forums as a guest for days you all have my upmost respect for being able to make applications do what you want them to do with a few lines of code!
Technical Details
Message-ID:
<3bc1629e.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,f6476008d29c4871,start X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: D_Scott_Chinn@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: (JS)(CS2) Taking Part of a String Variable Message-ID: <3bc1629e.-1@webcrossing.la2eafNXanI> Date: Thu, 24 Aug 2006 11:42:06 -0700 Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!news.ecp.fr!news.stben.net!webcrossing