Is there a script for changing layer names in ID CS4?

I have multiple documents with an average of 20 layers in each. Each of the layers is named for the expiration date of the coupon in the ads. When a new order comes in I retrieve the previous files and change the dates via scripts and the Find/Change option. I have looked but cannot find a way to rename the dates in the layers as well.
Does anyone know of a script for this?
Thanks in advance!

E-mail, eh? You're missing out a lot of fun stuff, as there is
- editing your own posts
- using bold and italics to highlight important stuff
- finally being able to shout (some posters think it's necessary to use a large bold font to make their post stand out in the crowd. They are correct, it does. In the Bad way.)
- inserting images
- uh, Jive (-- sorry, couldn't think of any more fun stuff to add)
Visit the scripting forum (using a web browser, s'il vous plait) by clicking here.

Similar Messages

  • Script for using layer name in Save for Web command

    I am using the Save for Web  command (Illustrator CS2) to export layers to CSS so that each layer is  saved as a different jpg.  The only issue I have is that I want the  layer name to be part of the file name, but layer name is not an option  when I look at the "Edit Output settings" dialog for saving files.  Is  there anyway I can do this? I do not have experience writing or working with scripts.
    For example. My fiel name is flower.ai.  I will have 20  different layers (each containing a different color of the same image)  and want the exported file to be flower-scarlet.jpg,  flower-cranberry,jpg, etc. Right now I am looking at renaming all the  files manually, but as I am creating 40 images per product on my website, this will be very time consuming.
    Thanks in advance
    Christine

    Btw.. to make it work for JPGs, change the PNG options to the following:
    var options = new ExportOptionsJPEG();
            options.antiAliasing = false;
            options.optimization = false;
            options.artBoardClipping = true;
            options.qualitySetting = 100; // value of 0 to 100, 60 is medium, 100 is perfect
            options.blurAmount = 0;
            options.verticalScale = 100;
            options.horizontalScale = 100;

  • Script to change layer name in to Document name.

    Hi I would like to make the active layer name the same as the document name.  I know very little about scripting.  I found this script:
    var idoc = app.activeDocument;
    var ilayer = idoc.activeLayer;
    var filename = idoc.name;
    ilayer.name = filename;
    It does almost what I need it to do. except that it also copies the ".ai" in to the layer name.  Is there some way to modify this script to have it exclude or delete the file extension?
    Thanks for any help.

    Or, if you want to keep the same construction as your example...
    var idoc = app.activeDocument;
    var ilayer = idoc.activeLayer;
    var filename = idoc.name;
    filename = filename.slice (0, filename.lastIndexOf(".")); //just add this line to the construction.
    ilayer.name = filename;
    Gustavo.

  • Script for adding layer name to artboard as text

    I've found scripts that are sort of close but not quite this.
    I have 1 artboard and many layers (see image).
    Does anyone have a script that will take the name of the layer, ie "01_Intro" and create and then place the text "01_Intro" on to the art board in layer 01_Intro? Then it would repeat the process for all the present layers?
    Thanks in advance!

    Waterbear,
    something like this?
    // LayersnamesInUpperLeftCorner.jsx
    // https://forums.adobe.com/thread/1546630
    // write layers names in upper left corner of the active artboard
    // required: opened document, no toplevel layers locked, all layers visible
    // regards pixxxelschubser
    var aDoc = app.activeDocument;
    var theLayers = aDoc.layers;
    for (i=0; i<theLayers.length; i++) {
        var txt = theLayers[i].textFrames.add();
        txt.position = [0,0];
        txt.contents = theLayers[i].name;
    Have fun

  • My brother-in-law recently passed away. My sister gave his MacBook Pro to my niece. When she opens and starts the laptop, it shows my brother-in-laws name. Is there a way to change his name to her name without formatting the device and starting over?

    My brother-in-law recently passed away. My sister gave his MacBook Pro to my niece. When she opens and starts the laptop, it shows my brother-in-laws name. Is there a way to change his name to her name without formatting the device and starting over?

    BigTex415,
    my condolences for your family’s loss. If all she seeks to do is to change the display name, and she’s willing to leave the account name unchanged, then she could do the following: log in as the administrative user and open the Users & Groups pane of System Preferences. If the padlock in the lower-left corner is locked, unlock it. Select the account that shows your brother-in-law’s name on the left-hand side of the window, and then on the right-hand side, change the text in the “Full name” textbox to her preferred display name. If desired, click on the padlock in the lower-left corner to relock it.

  • Scripts for changing the address of the user when they have been in the box for 6 months

    Scripts for changing the address of the user when they have been in the box for 6 months
    If users are in a folder for deactivated users and disabled users in Active Directory, and been there for 6 moths do: change email address in exchange to existing email address.old 
    Anyone have suggestions on how I can go about it?

    What is this "box"?  What is this "folder" you're asking about?  You'll likely get a better answer if you use standard terminology.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • How to find the existing sql server backup plan/schedule is there a script for that?

    Friends,
    Is there a easy way to find out in SQLServer (for All DB's) what is the current backup plan/schedule ? is there a script for that?
    Thanks,
    Karthikeyan Jothi

    To check the database backup 
    Select
    SERVERPROPERTY('ServerName'),
    db.name,
    CONVERT(VARCHAR(10), b.backup_start_date, 103) + + convert(VARCHAR(8), b.backup_start_date, 14) backup_start_date,
    CONVERT(VARCHAR(10), b.backup_finish_date, 103) + + convert(VARCHAR(8), b.backup_finish_date, 14) backup_finish_date,
    case
    when (DATEDIFF(hour, b.backup_start_date, getdate())<24)then 'Success'
    when (DATEDIFF(hour, b.backup_start_date, getdate())>=24)then 'Failed'
    end Status,
    DATEDIFF(hh, b.backup_finish_date, GETDATE())BackupAgeInHours,
    (b.backup_size/1024/1024/1024 )BackupSize,
    case b.[type]
    WHEN 'D' THEN 'Full'
    WHEN 'I' THEN 'Differential'
    WHEN 'L' THEN 'Transaction Log'
    END Type,
    ISNULL(STR(ABS(DATEDIFF(day, GetDate(),(Backup_finish_date)))), 'NEVER')DaysSinceLastBackup
    FROM sys.sysdatabases db
    Left OUTER JOIN (SELECT * , ROW_NUMBER() OVER(PARTITION BY database_name ORDER BY backup_finish_date DESC) AS RNUM
    FROM msdb.dbo.backupset) b ON b.database_name = db.name AND RNUM = 1
    where dbid<>2
    OR
    SELECT
    DISTINCT
    a.Name AS DatabaseName ,
    CONVERT(SYSNAME, DATABASEPROPERTYEX(a.name, 'Recovery')) RecoveryModel ,
    COALESCE(( SELECT CONVERT(VARCHAR(12), MAX(backup_finish_date), 101)
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'd'
    AND is_copy_only = '0'
    ), 'No Full') AS 'Full' ,
    COALESCE(( SELECT CONVERT(VARCHAR(12), MAX(backup_finish_date), 101)
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'i'
    AND is_copy_only = '0'
    ), 'No Diff') AS 'Diff' ,
    COALESCE(( SELECT CONVERT(VARCHAR(20), MAX(backup_finish_date), 120)
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'l'
    ), 'No Log') AS 'LastLog' ,
    COALESCE(( SELECT CONVERT(VARCHAR(20), backup_finish_date, 120)
    FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY backup_finish_date DESC ) AS 'rownum' ,
    backup_finish_date
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'l'
    ) withrownum
    WHERE rownum = 2
    ), 'No Log') AS 'LastLog2'
    FROM sys.databases a
    LEFT OUTER JOIN msdb.dbo.backupset b ON b.database_name = a.name
    WHERE a.name <> 'tempdb'
    AND a.state_desc = 'online'
    GROUP BY a.Name ,
    a.compatibility_level
    ORDER BY a.name
    To check the schedule you can try the below script
    https://gallery.technet.microsoft.com/SQL-Jobs-Complete-eabe0050
    --Prashanth

  • Edit catt script for changes in in web appl server higher than 6.4 release

    Hello Guru’s,
    Will you help me in editing the CATT script for changes in Web application server release higher than 6.4 release, when I look for edit mode it was showing the following message. will anyone suggest me is there any way to make changes.
    “While I was choosing change mode it was displaying the above message ( Message No:TT005)”
    Full points for the answer

    It seems there there is no problem with my FireFox 7.0.1 on my Mac OSX 10.7.2. So, maybe you can solve the problem by updating your OS. The only minor problem here is that Firefox doesn't display in the Tibetan fonts that you choose, it always display in Kailas font for Tibetan.

  • Is there a script for an audio controller linked to an embedded swf?

    Is there a script for an audio player or controller that has some functions like play resume stop for an embedded swf file?  I would use buttons for this purpose but for some reason, when I click on the pause button on the pdf, and then click on resume, playback resumes five seconds before the point at which I paused. And i would prefer to rely on just using the built in player in the pdf but the quicktime player doesn't play the swf smoothly; it freezes.

    iTunes Folder Watch
    tt2

  • I followed the directions for changing the name of my iPad and it did so in iTunes but the old name remains on the actual iPad. How can I change the name on the iPad itself?

    I followed the directions posted in questions/answers for changing the name of my iPad and it changed the name in iTunes but not on the actual iPad. How can I change the name on the iPad too?

    On your iPad, go to settings, general, about and click on name then change it.
    I did it on my iPad with iOS 5, i dont know if it works on iOS 4.3.2

  • Documentation for changing Server name

    Hi,
    I'm looking for documentation for changing server name. Ex. from prod1.domainname.com to prod2.domainname.com. We only change the server name, not the server itself.
    Does someone know where I can find it?
    Thanks
    André

    On the server side you need to edit two files:
    1. ORACLE_HOME/network/admin/listener.ora
    depending on the protocols you are accepting connections on, you need to change the value for HOST = <new server name goes here>
    2. ORACLE_HOME/dbs/init<SID>.ora
    You probably haven't specified this parameter, but if you did specify a value for LOCAL_LISTENER, then change it accordingly.
    On the client and server side you need to edit one file
    1. ORACLE_HOME/network/admin/tnsnames.ora
    Find the service names that refer to the databases that live on the server whose name was changed. If TCP is the protocol being used to connect to these databases, then change the HOST = <new server name goes here> accordingly.

  • Copying layers changes layer name

    Hi there,
    Im pretty good about naming my layers (and sublayers.) I find that when i copy and paste a layer, its being renamed. For example, I'll name a layer, "button_text_01" when i copy and paste that layer, InDesign renames it, "button_text_02" instead of something like, "button_text_01copy."
    I use numbers as part of my naming convention but dont want ID doing it automatically. Is there a setting to change this?
    thanks

    David_3000 wrote:
    … The search field would preferably work the same way as in a regular file search. That every layer that include the search criteria entered will appaer in a list, and then I can make a choice which layer to activate from that list …
    A script for this requirement is somewhat more complex.
    Unfortunately I have not got time for that.
    But to find a layer by name, try this simple script (Please save the script in Illustrator script folder as LayerActivatedByName.jsx and restart Illustrator. Then the script is accessible via the menu.):
    // LayerActivatedByName.jsx
    // an open document is required
    // only layers will be found - not sublayers and not pageItems
    // http://forums.adobe.com/thread/1223629?tstart=0
    // regards pixxxelschubser
    var aDoc = app.activeDocument;
    var myLayers = aDoc.layers;
    var actName = prompt("Which layer should be active?","layer 1");
    try {
        aDoc.activeLayer = myLayers.getByName (actName);
        redraw();
        actLayer = aDoc.activeLayer;
        actLayer.locked = false;
        actLayer.visible = true;
        redraw();
    catch (e) {
        alert ("Layer "+actName+" not found")
    You have to write the exact name of the layer (not sublayer and not page item!) in prompt. This layer will be unlocked, visible and active.

  • Is there a script for renaming layers in ID CS5?

    Hello,
    I am new to scripting (I just started today) so far I have found some very useful existing scripts to help automate my workflow. I am wondering if anyone knows of the existence of a layer renaming script for InDesign.
    I have seen similar scripts for PS. I want to learn how to script but I am in need of this one for Monday...
    Thanks in advance!

    Antonio:
      Please remember that we're all volunteers here. If you can ask your question so we can understand it, we can probably help you. But if you cannot, it would take quite a lot of effort on our part to even determine what you asking.
    Jongware wrote in the other thread:
    This is quite a specialized case so it's unlikely there "is" a script. But there "could be" one. Ask in the scripting forum, as there are some people in there sharpening their skills with such requests. Make sure to detail what you need it to do: which layers? rename to what? Et cetera.
    You're not doing a good job on detail. How would the script know what to change your first, 3rd, 4th, and 5th "atoms" to?
    You have given us no information that I can see.

  • How to change layer name with Wacom pen?

    Anyone have any good tips on this?
    50% of time I do this the style menu come up instead.
    With mouse, no problem, with Wacom pen, this happens.
    I don't see a right click option to change a layer name, maybe I don't see it? That would help a lot. thanks!

    kevin4545 wrote:
    Trevor,
    driver 6.1.5-2 Intuos 3.
    This has plagued me since on got on board with Wacom 5 years ago. No problem with mouse, just with Wacom.  Is there a new driver for this?
    I am using an Intuos 4 with driver 6.2.0w5
    Kevin was it you I was discussing drivers with a few weeks ago?  No, I have found the thread:
    http://forums.adobe.com/message/4186232#4186232

  • Script to search layer names

    Hi -
    Does anyone know if there is a script that can search through layer names within a file for a specific text string and then select it as the active layer?
    For instance, if a file has 4 layers, named My LayerX, LayerY, LayerZ, LayerA, I want to automatically search for a layer that has the text "rA" and make it the active layer.
    Thanks.

    This requires CS4 or better. It searchs using a RegExp and Action Manager so it should be very fast. It is set up now to deal with more than one matching layer.
    var re = /rA/;// a reg exp
    var matches = collectNamesAM(re);// get array of matching layer indexes
    for( var l = 0; l < matches.length; l++ ){
        makeActiveByIndex( l, false );
        // do something with layer
        alert(app.activeDocument.activeLayer.name);
    }// next match if any
    function collectNamesAM(re){
         var allLayers = new Array();
       var startLoop = Number( !hasBackground() );
       var endLoop = getNumberOfLayer();
       for( var l = startLoop;l < endLoop; l++){
            while( !isValidActiveLayer( l ) ) {
                l++;
            if( getLayerNameByIndex( l ).match(re) != null){
                allLayers.push( l );
         return allLayers;
    // Function: getActiveLayerIndex
    // Description: Gets gets the Action Manager API index
    //                        of activeLayer corrected for Background Layer
    // Usage: var idx = getActiveLayerIndex();
    // Input: None
    // Return: Number - correct AM itemIndex
    // Dependices: hasBackground
    function getActiveLayerIndex() {
         var ref = new ActionReference();
         ref.putProperty( 1349677170 , 1232366921 );
         ref.putEnumerated( 1283027488, 1332896878, 1416783732 );
         var res = executeActionGet(ref).getInteger( 1232366921 )
                                                           - Number( hasBackground() );
         res == 4 ? res++:res// why the skip in this doc?
         return res;  
    // Function: isValidActiveLayer( )
    // Description: Checks LayerSection for 'real' layers
    // Usage: if( isValidActiveLayer() )
    // Input: None
    // Return: Boolean - True if not the end of a Set
    // Notes:  Needed only if the layer was made active
    //               using Action Manager API
    function isValidActiveLayer( idx ) {
         var propName = stringIDToTypeID( 'layerSection' );// can't replace
         var ref = new ActionReference();
         ref.putProperty( 1349677170 , propName);// TypeID for "Prpr"
         // 'Lyr ", idx
         ref.putIndex( 1283027488, idx );
         var desc =  executeActionGet( ref );
         var type = desc.getEnumerationValue( propName );
         var res = typeIDToStringID( type );
         return res == 'layerSectionEnd' ? false:true;
    // Function: hasBackground
    // Description: Test for background layer using AM API
    // Usage: if( hasBackground() );
    // Input: None
    // Return: Boolean - true if doc has background layer
    // Notes:  Requires the document to be active
    //  DOM:  App.Document.backgroundLayer
    function hasBackground(){
        var res = undefined;
        try{
            var ref = new ActionReference();
            ref.putProperty( 1349677170 , 1315774496);
            ref.putIndex( 1283027488, 0 );
            executeActionGet(ref).getString(1315774496 );;
            res = true;
        }catch(e){ res = false}
        return res;
    function makeActiveByIndex( idx, forceVisible ){
         try{
              var desc = new ActionDescriptor();
              var ref = new ActionReference();
              ref.putIndex(charIDToTypeID( "Lyr " ), idx)
              desc.putReference( charIDToTypeID( "null" ), ref );
              desc.putBoolean( charIDToTypeID( "MkVs" ), forceVisible );
              executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
         }catch(e){ return -1;}
    function getNumberOfLayer(){
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var desc = executeActionGet(ref);
    var numberOfLayer = desc.getInteger(charIDToTypeID("NmbL"));
    return numberOfLayer;
    function getLayerNameByIndex( idx ) {
        var ref = new ActionReference();
        ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "Nm  " ));
        ref.putIndex( charIDToTypeID( "Lyr " ), idx );
        return executeActionGet(ref).getString(charIDToTypeID( "Nm  " ));;

Maybe you are looking for

  • Spdif and toslink pr

    I have the x-fi fatalty sound card with shiny new spdif in/out and optical in/out but i cant seem to get any of these to work. I have an old DAT-recorder (yeah yeah, i?m an oldtimer) with both spdif and optical but i cant get any signal to the comput

  • Performance improvement in OBIEE 11.1.1.5

    Hi all, In OBIEE 11.1.1.5 reports takes long time to load , Kindly provide me some performance improvement guides. Thanks, Haree.

  • SAP-ISU - Equipment number from installation

    Hi All, Regarding SAP - ISU. How to fine Equipment number from installation. Is there any table or function module. Please let me know. Please mail to *msrinuvas@gmail. com                        [email protected] * Thanks in Advance ! Regards, Srini

  • Error during JRMP connection

    I am havin some problem with RMI. Let me explain the application a bit first. I've an application form which invokes some remote method from the database (oracle). Since oracle cannot call remote methods directly from database, we use a bridge which

  • Installing skype failed code 1603

    Hi, I just upgrading the skype which is auto prompt by skype, now, got this error message, "installing skype failed code  1603". It popups another message before this error message, the popup messages says "object is exist". Anyone can help to resolv