Scripting problem replacing layer contents.

This is a follow up to the discussion in this thread http://forums.adobe.com/thread/480444?tstart=0.
I've virtually completed the script, I attached it as a .txt file rather than .jsx , In a brief nutshell it does the following:
Gets a text file name.
opens the psd identified in that document
walks the layers in that file
     if the layer is a text file and there is replacement text for that name in the input file, replace the text
     if the layer is an image (NORMAL) and there is an input file with a name (.jpg or .psd) matching the layer name then
           the layer is turned into a smart object and it's contents replaced with the contents of the relevant file.
Saves the modified psd file as the name indicated in the input file and close the original file.
If the input file indicates the file should be left open, reopen the modified file name.
Almost everything works well except ...
1. Sometimes the modified file loses it's layering and winds up with only a "background" layer whereas other times it retains it's layering. I'm sure this is due to some characteristic of the input template .psd, but with limited understanding of photoshop itself I've no idea what characteristic to look for.
Any suggestions as to what might be the source of this problem?
2. It appears that sometimes when creating the 1 layer file that will replace an image layer as a .jpg it losses the background transparency. This doesn't seem to happen if saved as a .psd, but the user wants to work with jpgs.
Any ideas why?
3. When replacing an image layer from another replacement file, the resulting new image in the modified file doesn't seem to be properly aligned. Incidentally, the same behaviour occurs if I do the steps of creating a smart layer and replacing manually in photoshop. I tried to attached the .psd files but the forum would not allow it.
Again any ideas why it might be misaligned or a code change that will fix it?
Any suggestions would be most thankfully accepted.
Steve Ellis.

3. When replacing an image layer from another replacement file, the resulting new image in the modified file doesn't seem to be properly aligned. Incidentally, the same behaviour occurs if I do the steps of creating a smart layer and replacing manually in photoshop. I tried to attached the .psd files but the forum would not allow it.
Again any ideas why it might be misaligned or a code change that will fix it
When a file is placed, you set the size and position in the layer. When you replace the contents the same transform values are used. If the file used to replace is not the same size as the first, it will not be the same size and location in the layer. I don't know of any way to determine the transform or reset it. The script could resize but that would require opening the file, resizing, and saving before the replace.
I created the .psd file with which to replace the image layer from the image layer of the original by changing the image and saving it. I then checked the image size, canvas size, and transform values of both and they matched. When I ran the program the replaced image was misplaced, too high in the new psd. I then editing the replacing file and changing the y transform value until it resulted in the right place when placed by the script. For it to work properly the y transform value of the replacing layer was approximately 100 more than the replaced layer (I assume this particular value will vary with the particulars of the files). This is what confuses me, when they were identical it didn't work properly.

Similar Messages

  • If my computer has been open for a short while, when I open firefox, it freezes and shows this script-problem: chrome://ylayers/content/overlay.js:280

    A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
    script: chrome://ylayers/content/overlay.js:280
    The only way to move on is to access the jobmenu and close it manually, then restart the computer. If I stop using the web for a while, the problem reoccurs.
    I have windows vista home premium on dell and firefox 14.0.1.0

    This issue can be caused by an extension (ylayers) that isn't working properly.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Automated script to replace folder contents

    Hi,
    I would like to write a script that does the following:
    -find all folders with name ending in _2 (underscore 2)
    -for each such folder named X_2:
    -find the folder X (with same name but without the _2 suffix)
    -move all files of X into X_2 (overwriting existing files with the same name)
    Any ideas on how to do this?
    Thanks

    Try the AppleScript forum under OS X Technologies or the Automator forum under Leopard.

  • A script for replacing texts only in selected layer?

    Hi all,
    I have an illustrator document which has many text layers. I have found the script below that replace a text with another one in the document;
    var doc = app.activeDocument;
    var myTextFrames = doc.textFrames;
    for (i = 0; i < myTextFrames.length; i++) {
    var myTF_ByI = myTextFrames[i];
    var str = myTF_ByI.contents
    var res = str.replace("word1", "word2");
    myTF_ByI.contents = res
    However, there is one problem that the script also replaces the text in other layers even though they are hidden or locked. Could you help me adjust this script to be effective only for the selected or unhidden layer?
    Cheers,
    Akin

    Hi elmagnifico,
    this is strange.
    Before running the script snippet:
    and after running the snippet:
    Can you show us your layers palette? Do you really layers mean – and not sublayers or not simple text items in one layer???
    regards

  • A Script to Find and Replace Layer Names

    Are there any scripts to find and replace layer names?
    There is an excellent script available for Photoshop which allows you to not only replace words in layer names, but also insert words as Prefixes, Suffixes and Sequential Numbers.
    The illustrator version of this script only allows sequential numbering: It doesn't offer find and replacing of words.
    Ideally, it would be great if there was something that could do multiple find and replaces in one go:
    (e.g.
    You have layers like this Car, Dog, Bat
    You enter: car(Option1), dog(Option2), Bat(Option3)
    Your layers then become: Option1, Option2, Option3).

    big_smile, that's a very good start! Step 1 of Learning How To Script is indeed, adjusting an existing simple script to make it do more complicated things. (And usually then "break something", which is also a required part of the process.)
    You are correct in your observation this is repetitive stuff. For one or two different items that wouldn't be a problem, but in longer lists you soon get lost.
    The usual way of working with find-change lists is to build an array:
    var layernames = [
    [ 'FHairBowlBoy *Hair', 'Hairboy1' ],
    [ 'FHairCurlyafroBoy *Hair', 'Hairboy2' ],
    [ 'FHairSpikyBoy *Hair', 'Hairboy3' ],
    The general idea is to loop over all names, check if the current layer name is "layernames[i][0]" (the left column) and if so, rename it to "layernames[i][1]" (the right column). If you know how to write a loop in Javascript, then you can implement this right away.
    However ..
    A more advanced way to do this doesn't even need loop to over all layernames -- instead you can immediately "get" the correct name per layer! It's magic! Almost!
    The trick is to use a Javascript object instead of an array. Javascript objects are nothing special; Illustrator's 'layers' is an array of objects, and each object "layer" has a property "name", whose value you can read and set. What I do here is create a new object, where the "name" part is the original layer name and its value is the new layer name. All you need to check for per each layer is if there is a property 'object.originalLayerName', and if so, assign its value to that layer name.
    This looks a bit like the array above, except that (1) you use {..} instead of [..] to create an object, and (2) you add "name:value" pairs instead of "value" only (actually, the 'name' of a value in an array is simply its number).
    So this is what it looks like:
    // JavaScript Document
    var doc = app.activeDocument;
    // name indexed object
    var layernames = {
    'FHairBowlBoy *Hair':'Hairboy1',
    'FHairCurlyafroBoy *Hair':'Hairboy2',
    'FHairSpikyBoy *Hair':'Hairboy3'
    // loop through all layers
    for (var i = 0; i < doc.layers.length; i++)
    //Set up Variable to access layer name
    var currentLayer = app.activeDocument.layers[i];
    if (layernames[currentLayer.name])
      currentLayer.name = layernames[currentLayer.name];
    Enjoy!

  • Script reporting wrong layer type after replacing footage

    Hi,
    I do have a Composition with Solid layer. When I run this script with the layer selected, it shows me that this really is a solid layer:
    curLayer = app.project.activeItem.selectedLayers[0];
    if (curLayer.source.mainSource instanceof SolidSource) {
    alert("this is solid");
    }else {
    alert("this is not solid"); }
    But when I select this solid in the Project window, right click, select Replace footage - File, and select an image, when I run the same script again, it still displays "this is solid" message.
    When I reopen the After Effect file, is shows "this is not solid", which is right.
    Is this a bug, or do I need to call some refresh function?
    Thanks a lot!

    Hi Myleniu,
    Thanks for your replay. Actually, it doesn't matter what makes up my comp, this problem just randomly happen when I render any comp. For example, I have a comp named "noise", I run a script to replace the music then render it, I use a "for" loop to do this 5 times and the music noise problem just happen one time.
    I'm starting to think that win server might be the problem.

  • Replace layer names in selected layers only

    I am using this script to find and replace words in layers. (The script only targets particualr words, rather than the whole layer name).
    I would like to make it so it targets selected layers only.
    I have found this script which loops through selected layers only, but I am not sure how to add the find and replace layer name functioality.
    Thanks for any help that can be offered.

    big_smile wrote:
    Looking through the guide, it doesn't seem "hasSelectedArtwork", is a built in function either. Are there any tutorials or guides that explain how to target selected layers?
    Wrong reference manual, see this one:
    http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/illustrator/scripting/cs6/Illustrator -Scripting-Reference-JavaScript.pdf
    Page 91 -- CHAPTER 1: JavaScript Object Reference
    Layer
    Property
    hasSelectedArtwork
    Value type
    boolean
    What it is
    If true, an object in this layer has been selected; set to false to deselect all objects in the layer.
    So as I talked about here:
    W_J_T wrote:
    Correct. Yeah there is no direct way unfortunately (like many things via scripting), thats why I suggested using "hasSelectedArtwork", that would work if you select the layer target when selecting your desired layers to rename.
    and...
    W_J_T wrote:
    if(layerReferenceString.hasSelectedArtwork == true){
         // relative code
    That would offer a way to know if a layer is selected or not.
    As far as I know that is the only round about way of knowing if a layer is selected via scripting.

  • I need a script to replace layers. PS CS5

    Ok, let's say I need to replace layer (x) with layer (y), of course, Layer (y) is not in the composition.
    (NOTE: layer (y) is a Vector Smart Layer while layer (x) is a regular layer named "Layer 4")
    And yes each Layer (x) is named "Layer 4"
    The Problem is ... There are 59 of layer (x) in the composition, and I need to replace each and everyone with layer (y)!
    I would do it manually although it's time consuming, but there's also the problem that the PC slows down as I open the composition because it is 732MB and 900+ Layers, So I figured out the best way to do it is with a script, But unfortunately I have no idea how to type a script and when I googled it, I found 1 Script that can do so but it did not really work!

    Scripting is programming requires knowledge there is a Photoshop Scripting forum you can ask for help with your found script. They user there may help you modify it to work the way you want it to work if the script was not save in binary. However without some programming knowledge it may be a hard thing for you to do.

  • Document Creation error - "We're sorry. We can't open document name because we found a problem with its contents"

    Morning Friends,
    I have created a SharePoint 2010 "Site Workflow" that is designed to take information from a form and create a Word doc with the gathered information and store this Word doc in a document library.
    I am using Sharepoint 2013 with Office 2013 
    I understand there are a lot of steps (19) outlined below and I can provide more information as needed but the bottom line is this, workflow successfully takes info from an initiation form, uses the info to create a Word doc. Places this Word doc in a library.
    When attempting to open / edit doc, receive error
    "We're sorry. We can't open <document name> because we found a problem with its contents"
    Details - No error detail available.
    Any info or advice would be greatly appreciated. 
    Very high level view of what I have done:
    1 - Created content type called "Letters"
    2 - Added site columns " First Name" and "Last Name"
    3 -  Created and saved to my desktop a very basic Word document (Letter.docx) that says "Hello, my name is XXXX XXXX"
    4 - In the advanced settings of the "Letters" content type I uploaded this "Letter.docx" file as the new document template.
    5 - Created a new document library called "Letters"
    6 - In Library Settings - Advanced Settings, clicked "Yes" to enable the management of content types.
    7 - Then I clicked "Add from existing content types" and added the "Letters" content type
    8 - Back in the advanced settings of the "Letters" content type I selected "Edit Template" and replaced the first XXXX with the Quick Part "First Name" and the second XXXX with the Quick part "Last Name"
    9 - Created a new 2010 Site workflow called "Create a Letter"
    10 - To the workflow I added the action "Create List Item"
    11 - Configured the action to create Content Type ID "Letters" in the document library "Letter" 
    12 - For the "Path and Name" I gave it a basic name of "Letter to"
    13 - The next step was to create the Initiation Form Parameters and added to form entries "First Name" and "Last Name"
    14 - I then linked the initiation form fields to the data source "Workflow Variables and Parameters" to their respective Field from Source parameters
    15 - Went back to the "Path and Name" and modified the basic name of "Letter to" to include the first and last name parameters.
    16 - Saved - published and ran the work flow.
    17 - As expected, Initiation Form prompts for First and Last Name. ("John Doe") Then click "start
    18 - Go to document library "Letters" and see a new Word document created titles "Letter to John Doe" 
    19 - Go to open / edit the Word document and receive the following error
    thoughts? Any info or advice would be greatly appreciated. 

    See this MS support article for SP2010 workflows and generating Word docs:
    https://support.microsoft.com/kb/2889634/en-us?wa=wsignin1.0
    "This behavior is by design. The Create
    List Item action in the SharePoint
    2010 Workflow platform can't convert Word content type file templates to the correct .docx format."
    I've had success in using SP 2013, Word 2013 (saving a .docx as the template instead of .dotx for the document library content type), and an SP 2010 workflow using SP Designer 2013.

  • Adobe Photoshop CC lags on Macbook Pro when moving layer content around

    Hi,
    We just bought new Macbook Pro laptops last Friday and also got Adobe Photoshop CC and Adobe Illustrator CC. Everything works pretty fine, except moving layer content eg. images or fonts around is a bit behind, slow/laggy, without any apparent reason.
    This happens despite external screen connected or not. It also happens with or without power adapter connected. We have brand new Mac OS Mavericks and 16GB RAM so performance should not be a problem.
    I hope you can help out, we are a digital agency and do a lot of graphical work. Thanks in advance.
    Some information (translated from Finnish system info):
    Model name:          MacBook Pro
    Model:          MacBookPro11,1
    Processor:          Intel Core i5
    Processor speed:          2,4 GHz
    Processor amount:          1
    Core amount:          2
    L2-memory per core:          256 kt
    L3-memory:          3 Mt
    RAM:          16 GB
    Graphics/Screens:
    Intel Iris:
      Chip model: Intel Iris
      Type:          GPU
      Internal
      VRAM (total):          1024 Mt
      Intel (0x8086)
      0x0a2e
      0x0009
    Color-LCD:
      Retina-LCD
      2560 x 1600
      Retina:          Yes
      32-bit color (ARGB8888)
      Mirroring: Off
      Online:          Yes
      Internal:          Yes
    Acer V243PWL:
      1920 x 1200 @ 59 Hz
      32-bit color (ARGB8888)
      DisplayPort

    i cant believe this problem is still happening. same exact issue here. photoshop cs6 and CC run like **** on my macbook but run smooth on windows 7 on the same exact hardware, macbook pro 2.5ghz core i5, 16gb ram and intel hd 4000. ive talked with applecare about this, adobe support (who hasn't called me back twice now) and no response on how to fix this. its absolutely ridiculous that we are having to go through this much trouble to get this problem fixed. ive brought it up over 5 times now and no solution except for the usual suggestions (turn off hardware acceleration, delete your preferences, yada yada). same hardware, mac osx photoshop cc lags, windows photoshop runs fine.. something is wrong with the mac version of photoshop cs6 and CC adobe please fix this as soon as possible.

  • Problem with layer sets opening

    Hi,
    I have a problem open layer sets. In my script I get layers index and then iterate throught this layers.
    Here is the script:
    function getAllLayersByIndex(){
           function getNumberLayers(){
           var ref = new ActionReference();
           ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID("NmbL") )
           ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
           return executeActionGet(ref).getInteger(charIDToTypeID("NmbL"));
           function hasBackground() {
               var ref = new ActionReference();
               ref.putProperty( charIDToTypeID("Prpr"), charIDToTypeID( "Bckg" ));
               ref.putEnumerated(charIDToTypeID( "Lyr " ),charIDToTypeID( "Ordn" ),charIDToTypeID( "Back" ))//bottom Layer/background
               var desc =  executeActionGet(ref);
               var res = desc.getBoolean(charIDToTypeID( "Bckg" ));
               return res  
           function getLayerType(idx,prop) {      
               var ref = new ActionReference();
               ref.putIndex(charIDToTypeID( "Lyr " ), idx);
               var desc =  executeActionGet(ref);
               var type = desc.getEnumerationValue(prop);
               var res = typeIDToStringID(type);
               return res  
           function getLayerVisibilityByIndex( idx ) {
               var ref = new ActionReference();
               ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "Vsbl" ));
               ref.putIndex( charIDToTypeID( "Lyr " ), idx );
               return executeActionGet(ref).getBoolean(charIDToTypeID( "Vsbl" ));;
           var cnt = getNumberLayers()+1;
           var res = new Array();
           if(hasBackground()){
        var i = 0;
              }else{
        var i = 1;
           var prop =  stringIDToTypeID("layerSection");
           for(i;i<cnt;i++){
              var temp = getLayerType(i,prop);
              if(temp != "layerSectionEnds") res.push(i);
           return res;
           function getLayerVisibilityByIndex( idx ) {
               var ref = new ActionReference();
               ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "Vsbl" ));
               ref.putIndex( charIDToTypeID( "Lyr " ), idx );
               return executeActionGet(ref).getBoolean(charIDToTypeID( "Vsbl" ));
    function makeActiveByIndex( idx, visible ){
        var desc = new ActionDescriptor();
          var ref = new ActionReference();
          ref.putIndex(charIDToTypeID( "Lyr " ), idx)
          desc.putReference( charIDToTypeID( "null" ), ref );     
          desc.putBoolean( charIDToTypeID( "MkVs" ), visible );
       executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
    var groups = getAllLayersByIndex();
        for(var i = groups.length-1; i >= 0 ; i--) {
          makeActiveByIndex( groups[i], true );
          ....working with layers....
    I think, my problem is in function makeActiveByIndex, because it doesn't make active a folder and doesn't open it.
    You can see it on this picture. Active layer set is "Skupina 1" and it is in layer set "hlavicka". But "hlavicka" is not open. WHY??
    Can you help me fix this problem??
    Thank you Domaneni

    Hi, for the past days I've worked on a script to toogle opening and closing layeSets, I've taken the code that TeddyBear posted here: http://ps-scripts.com/bb/viewtopic.php?p=14773 and adjusted it a little bit, and that's what I came up with, I hope it will help you:
    <javascriptresource>
      <name>BCM> ToogleOpen_CloseGroup...</name>
      <category>BCM</category>
    </javascriptresource>
    //For code readability
    // http://ps-scripts.com/bb/viewtopic.php?f=9&t=3235
    function getActiveLayerIndex() {
        var ref = new ActionReference();
        ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "ItmI" ));
        ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        return executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ));
    function cTID(s){return charIDToTypeID(s)}
    function sTID(s){return stringIDToTypeID(s)}
    // =============================
    // The main function
    function closeGroup(layerSet) {
       var m_Name = layerSet.name;
       var m_Opacity = layerSet.opacity;
       var m_BlendMode = layerSet.blendMode;
       var m_LinkedLayers = layerSet.linkedLayers;
      var currINDEX = getActiveLayerIndex();
       var m_bHasMask = hasLayerMask();
       if(m_bHasMask) loadSelectionOfMask();
       if(layerSet.layers.length <= 1) {
          addTempLayerSetIn(currSetIDX-1);
          makeActiveByIndex(currSetIDX+2, false);
          ungroup();
          groupSelected(m_Name);
          deleteTempLayerSetbyIdx(currSetIDX+1);
       } else {
           makeActiveByIndex(currSetIDX, false);
          ungroup();
          groupSelected(m_Name);
       var m_Closed = activeDocument.activeLayer;
       m_Closed.opacity = m_Opacity;
       m_Closed.blendMode = m_BlendMode;
       for(x in m_LinkedLayers) {
          if(m_LinkedLayers[x].typename == "LayerSet")
             activeDocument.activeLayer.link(m_LinkedLayers[x]);
       if(m_bHasMask) maskFromSelection();
       return m_Closed;
    // =============================
    // Below are all necessary subroutines for the main function to work
    function ungroup() {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated( cTID( "Lyr " ), cTID( "Ordn" ), cTID( "Trgt" ) );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       try {
          executeAction( sTID( "ungroupLayersEvent" ), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function addLayer() {
       var m_ActiveLayer          =    activeDocument.activeLayer;
       var m_NewLayer             =    activeDocument.layerSets.add();
       m_NewLayer.move(m_ActiveLayer, ElementPlacement.PLACEBEFORE);
       return m_NewLayer;
    function hasLayerMask() {
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated( sTID( "layer" ), cTID( "Ordn" ), cTID( "Trgt" ));
       var m_Dsc01= executeActionGet( m_Ref01 );
       return m_Dsc01.hasKey(cTID('Usrs'));
    function activateLayerMask() {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated( cTID( "Chnl" ), cTID( "Chnl" ), cTID( "Msk " ) );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       try {
          executeAction( cTID( "slct" ), m_Dsc01, DialogModes.NO );
       } catch(e) {
          var m_TmpAlpha = new TemporaryAlpha();
          maskFromSelection();
          activateLayerMask();
          m_TmpAlpha.consume();
    function deleteMask(makeSelection) {
       if(makeSelection) {
          loadSelectionOfMask();
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated( cTID( "Chnl" ), cTID( "Ordn" ), cTID( "Trgt" ) );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       try {
          executeAction( cTID( "Dlt " ), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function selectLayerMask() {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putEnumerated(cTID("Chnl"), cTID("Chnl"), cTID("Msk "));
       m_Dsc01.putReference(cTID("null"), m_Ref01);
       m_Dsc01.putBoolean(cTID("MkVs"), false );
       try {
          executeAction(cTID("slct"), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function loadSelectionOfMask() {
       selectLayerMask();
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putProperty( cTID( "Chnl" ), cTID( "fsel" ) );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       var m_Ref02 = new ActionReference();
       m_Ref02.putEnumerated( cTID( "Chnl" ), cTID( "Ordn" ), cTID( "Trgt" ) );
       m_Dsc01.putReference( cTID( "T   " ), m_Ref02 );
       try {
          executeAction( cTID( "setd" ), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function maskFromSelection() {
       if(!hasLayerMask()) {
          var m_Dsc01 = new ActionDescriptor();
          m_Dsc01.putClass( cTID( "Nw  " ), cTID( "Chnl" ) );
          var m_Ref01 = new ActionReference();
          m_Ref01.putEnumerated( cTID( "Chnl" ), cTID( "Chnl" ), cTID( "Msk " ) );
          m_Dsc01.putReference( cTID( "At  " ), m_Ref01 );
          m_Dsc01.putEnumerated( cTID( "Usng" ), cTID( "UsrM" ), cTID( "RvlS" ) );
          try {
             executeAction( cTID( "Mk  " ), m_Dsc01, DialogModes.NO );
          } catch(e) {
             activeDocument.selection.selectAll();
             maskFromSelection();
       } else {
          if(confirm("Delete existing mask?", true, "Warning")) {
             activateLayerMask();
             deleteMask();
    function groupSelected(name) {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putClass( sTID( "layerSection" ) );
       m_Dsc01.putReference(  cTID( "null" ), m_Ref01 );
       var m_Ref02 = new ActionReference();
       m_Ref02.putEnumerated( cTID( "Lyr " ), cTID( "Ordn" ), cTID( "Trgt" ) );
       m_Dsc01.putReference( cTID( "From" ), m_Ref02 );
       var m_Dsc02 = new ActionDescriptor();
       m_Dsc02.putString( cTID( "Nm  " ), name);
       m_Dsc01.putObject( cTID( "Usng" ), sTID( "layerSection" ), m_Dsc02 );
       executeAction( cTID( "Mk  " ), m_Dsc01, DialogModes.NO );
       return activeDocument.activeLayer;
    function addToSelection(layerName) {
       var m_Dsc01 = new ActionDescriptor();
       var m_Ref01 = new ActionReference();
       m_Ref01.putName( cTID( "Lyr " ), layerName );
       m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
       m_Dsc01.putEnumerated( sTID( "selectionModifier" ), sTID( "selectionModifierType" ), sTID( "addToSelection" ) );
       m_Dsc01.putBoolean( cTID( "MkVs" ), false );
       try {
          executeAction( cTID( "slct" ), m_Dsc01, DialogModes.NO );
       } catch(e) {}
    function TemporaryAlpha() {
       activeDocument.selection.store((this.alpha = activeDocument.channels.add()));
       activeDocument.selection.deselect();
       this.consume = function() {
          activeDocument.selection.load(this.alpha);
          this.alpha.remove();
    function makeActiveByIndex( idx, visible ){
         if( idx.constructor != Array ) idx = [ idx ];
         for( var i = 0; i < idx.length; i++ ){
              var desc = new ActionDescriptor();
              var ref = new ActionReference();
              ref.putIndex(charIDToTypeID( 'Lyr ' ), idx[i])
              desc.putReference( charIDToTypeID( 'null' ), ref );
              if( i > 0 ) {
                   var idselectionModifier = stringIDToTypeID( 'selectionModifier' );
                   var idselectionModifierType = stringIDToTypeID( 'selectionModifierType' );
                   var idaddToSelection = stringIDToTypeID( 'addToSelection' );
                   desc.putEnumerated( idselectionModifier, idselectionModifierType, idaddToSelection );
              desc.putBoolean( charIDToTypeID( 'MkVs' ), visible );
              executeAction( charIDToTypeID( 'slct' ), desc, DialogModes.NO );
    function deleteActiveLayer(){
       // =======================================================
       var idDlt = charIDToTypeID( "Dlt " );
           var desc752 = new ActionDescriptor();
           var idnull = charIDToTypeID( "null" );
               var ref529 = new ActionReference();
               var idLyr = charIDToTypeID( "Lyr " );
               var idOrdn = charIDToTypeID( "Ordn" );
               var idTrgt = charIDToTypeID( "Trgt" );
               ref529.putEnumerated( idLyr, idOrdn, idTrgt );
           desc752.putReference( idnull, ref529 );
       executeAction( idDlt, desc752, DialogModes.NO );
    function isLayerSet( idx ) {
         var propName = stringIDToTypeID( 'layerSection' );
         var ref = new ActionReference();
         ref.putProperty( charIDToTypeID( "Prpr" ) , propName);
         ref.putIndex( charIDToTypeID ( "Lyr " ), idx );
         var desc =  executeActionGet( ref );
         var type = desc.getEnumerationValue( propName );
         var res = typeIDToStringID( type );
         // alert(res);
         return res == 'layerSectionStart' ? true:false;
    function openGroup1(theGroup) {
       currSetIDX= getActiveLayerIndex();
       if(isLayerSet( currSetIDX ))
        getNamesPlusIDsOfLayerSet();
      makeActiveByIndex(currSetIDX, false);
    function getNamesPlusIDsOfLayerSet(){
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('Cnt '));
      var parId = executeActionGet(ref).getInteger(stringIDToTypeID( 'layerID' ));
       var Names=[];
       var x = 0;
       var y = 0;
       var r = 0;
       currINDEX = getActiveLayerIndex();
        var i = currINDEX;
       for(i; i > 0 ; i--){
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
            ls = typeIDToStringID(ls);
            // alert(layerName+": _ :"+ls);
            if(ls == "layerSectionStart"){x++};
            if(layerName.match(/^<\/Layer group/) )
              y ++;
              r = x - y;
              if(r == 0 && ls == "layerSectionEnd"){break};
              continue
            if(ls == "layerSectionContent"){makeActiveByIndex(i,false);break};
            var layerType = typeIDToStringID(desc.getEnumerationValue( stringIDToTypeID( 'layerSection' )));
            var isLayerSet =( layerType == 'layerSectionContent') ? false:true;
    Names.push([[Id],[layerName],[isLayerSet]]);
    return Names;
    function getLayersNb()//function to find out if the number of layers in the document
        var ref = new ActionReference();
        ref.putProperty( charIDToTypeID( 'Prpr' ), stringIDToTypeID('numberOfLayers') );
        ref.putEnumerated( charIDToTypeID( "Dcmn" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        var desc = executeActionGet(ref);
        var numberOfLayers = desc.getInteger(stringIDToTypeID('numberOfLayers'));
        return numberOfLayers;
    function toogleOpenCloseSet(){
      myALayerIDX = getActiveLayerIndex();
      myGroupP = app.activeDocument.activeLayer;
      if(!isLayerSet(myALayerIDX)){
          myGroupP = app.activeDocument.activeLayer.parent;
          if(myGroupP.typename != "Document"){
            if(isSetOpened1(myGroupP)){closeGroup(myGroupP)}else{openGroup1(myGroupP)};
      }else{
        if(isSetOpened1(myGroupP)){closeGroup(myGroupP)}else{openGroup1(myGroupP)};
    function getFristLayerSetChildVisible(){
      xx = false;
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('Cnt '));
      var parId = executeActionGet(ref).getInteger(stringIDToTypeID( 'layerID' ));
       var Names=[];
        var x = 0;
        var y = 0;
        var r = 0;
       currINDEX = getActiveLayerIndex();
        var i = currINDEX;
       for(i; i > 0 ; i--){
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
            ls = typeIDToStringID(ls);
            var vis = desc.getInteger(stringIDToTypeID( 'visible' ));
            // alert(layerName+": _ :"+vis);
    /*        if(desc.hasKey(stringIDToTypeID("visible")))
              alert(desc.getType(stringIDToTypeID("visible")));
            if(ls == "layerSectionStart"){x++};
            if(vis == 1 && Id!=parId && r!=0){
              var theOBj = {id:Id, lname:layerName, idx:i};
              xx =true;
              Names.push(theOBj);
              break;
            if(layerName.match(/^<\/Layer group/) )
              y ++;
              r = x - y;
              if(r == 0 && ls == "layerSectionEnd"){break};
              continue
        return Names;
    function getLastChildIdx(){
      xx = false;
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('Cnt '));
      var parId = executeActionGet(ref).getInteger(stringIDToTypeID( 'layerID' ));
       currINDEX = getActiveLayerIndex();
        var i = currINDEX;
        var x = 0;
        var y = 0;
        var r = 0;
        var lastChIdx = 0;
       for(i; i > 0 ; i--){
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
            ls = typeIDToStringID(ls);
            var vis = desc.getInteger(stringIDToTypeID( 'visible' ));
            if(ls == "layerSectionStart"){x++};
            if(layerName.match(/^<\/Layer group/) )
              y ++;
              r = x - y;
              if(r == 0 && ls == "layerSectionEnd")
                lastChIdx = i;
                break;
            // alert(x+" _ "+y+" _ "+r+" _ "+layerName);
        return lastChIdx;
    function getNbOfChilds(){
      xx = false;
       var ref = new ActionReference();
       ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('Cnt '));
      var parId = executeActionGet(ref).getInteger(stringIDToTypeID( 'layerID' ));
       currINDEX = getActiveLayerIndex();
        var i = currINDEX;
        var nb = 0;
        var x = 0;
        var y = 0;
        var r = 0;
       for(i; i > 0 ; i--){
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
            ls = typeIDToStringID(ls);
            var vis = desc.getInteger(stringIDToTypeID( 'visible' ));
            if(ls == "layerSectionStart"){x++};
            if(layerName.match(/^<\/Layer group/) )
              y ++;
              r = x - y;
              if(r == 0 && ls == "layerSectionEnd")
                break
              continue
            nb++;
        return nb;
    function isSetOpened1( group ){
      app.activeDocument.activeLayer = group;
      xx = true;
      currSetIDX = getActiveLayerIndex();
      addTempLayerSetIn(currSetIDX-1);
      var fIdx = getActiveLayerIndex();
      makeActiveByIndex(currSetIDX+2, false);
      if(fIdx == getActiveLayerIndex())
        xx = false;
      deleteTempLayerSetbyIdx(currSetIDX+1);
      return xx;
    function addTempLayerSetIn(idxx){
        // =======================================================
        var idMk = charIDToTypeID( "Mk  " );
            var desc58 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref63 = new ActionReference();
                var idlayerSection = stringIDToTypeID( "layerSection" );
                ref63.putClass( idlayerSection );
            desc58.putReference( idnull, ref63 );
        executeAction( idMk, desc58, DialogModes.NO );
        // =======================================================rename
        var idsetd = charIDToTypeID( "setd" );
            var desc202 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref209 = new ActionReference();
                var idLyr = charIDToTypeID( "Lyr " );
                var idOrdn = charIDToTypeID( "Ordn" );
                var idTrgt = charIDToTypeID( "Trgt" );
                ref209.putEnumerated( idLyr, idOrdn, idTrgt );
            desc202.putReference( idnull, ref209 );
            var idT = charIDToTypeID( "T   " );
                var desc203 = new ActionDescriptor();
                var idNm = charIDToTypeID( "Nm  " );
                desc203.putString( idNm, "mb-dummy tempTestLayerSetOpen_Closed" );
            var idLyr = charIDToTypeID( "Lyr " );
            desc202.putObject( idT, idLyr, desc203 );
        executeAction( idsetd, desc202, DialogModes.NO );
        // =======================================================move
        var idmove = charIDToTypeID( "move" );
            var desc59 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref64 = new ActionReference();
                var idLyr = charIDToTypeID( "Lyr " );
                var idOrdn = charIDToTypeID( "Ordn" );
                var idTrgt = charIDToTypeID( "Trgt" );
                ref64.putEnumerated( idLyr, idOrdn, idTrgt );
            desc59.putReference( idnull, ref64 );
            var idT = charIDToTypeID( "T   " );
                var ref65 = new ActionReference();
                var idLyr = charIDToTypeID( "Lyr " );
                ref65.putIndex( idLyr, idxx );
            desc59.putReference( idT, ref65 );
            var idAdjs = charIDToTypeID( "Adjs" );
            desc59.putBoolean( idAdjs, false );
            var idVrsn = charIDToTypeID( "Vrsn" );
            desc59.putInteger( idVrsn, 5 );
        executeAction( idmove, desc59, DialogModes.NO );
    function deleteTempLayerSetbyIdx(idxx){
      // =======================================================
      var idDlt = charIDToTypeID( "Dlt " );
          var desc = new ActionDescriptor();
              var ref = new ActionReference();
              ref.putIndex(charIDToTypeID( 'Lyr ' ), idxx);
              // ref.putIdentifier(charIDToTypeID( 'Lyr ' ), idxx);
              desc.putReference( charIDToTypeID( 'null' ), ref );
      executeAction( idDlt, desc, DialogModes.NO );
    toogleOpenCloseSet();

  • CF scripts not consistently listing contents of folder

    Hello.
    I upload multiple types of files to the server. Sometimes
    they are folders, word docs, ppts, pdfs or xls files. There is a
    script that runs that is supposed to list everything that I have
    uploaded into a directory. The problem is, it does not work
    consistently. Sometimes it will display all files, subdirectories,
    files within, sometimes it will say that nothing is there. I am not
    sure why it will work with some files/folders, and won't with
    others. Some folders work great, some don't. It may be a
    permissions problem, I'm not sure...
    Here's an example - I have a folder and a word document in
    the "root" files directory. When viewing in the browser, it
    displays "No Files Found". Then if I move a ppt back a directory -
    to the root, all 3 items (word doc, folder and ppt) will then show
    in the browser. For some reason the ppt triggers everything to
    suddenly show. This "magical" ppt does not work for every directory
    though. Some items just won't show no matter what.
    Here's a sample script that lists the contents of the
    directory:
    <cfinclude template="../usercheck.cfm">
    <cfparam name="URL.module" default="">
    <cfparam name="URL.file" default="">
    <cfparam name="URL.action" default="">
    <HTML>
    <HEAD>
    <TITLE>Title</TITLE>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
    charset=iso-8859-1">
    <link href="../links.css" rel="stylesheet"
    type="text/css">
    <!-- End Preload Script -->
    <style type="text/css">
    <!--
    .style3 {color: #FFFFFF; font-weight: bold; }
    .style6 {font-size: 10px}
    -->
    </style>
    </HEAD>
    <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0
    MARGINWIDTH=0 MARGINHEIGHT=0 ONLOAD="preloadImages();">
    <a href="/index.html"><img src="/Images/graphic.gif"
    width="169" height="84" border="0"></a>
    <br>
    <cfset pathn =
    "#getDirectoryFromPath(cgi.PATH_TRANSLATED)#files">
    <CFIF (URL.file IS NOT '')>
    <CFDIRECTORY ACTION="LIST"
    DIRECTORY="#pathn##urldecode(url.module)#"
    NAME="FileCheck"
    FILTER="#URL.file#">
    <cfif URL.action eq "Delete">
    <CFIF FileCheck.RecordCount GT 0>
    <cffile file="#pathn##urldecode(url.module)##URL.file#"
    action="delete">
    <cflocation
    url="module.cfm?module=#URLEncodedFormat(url.module)#">
    </CFIF>
    <cfelse>
    <CFIF FileCheck.RecordCount GT 0>
    <!--- <cfhttp
    method="Get"
    url="#getdirectoryfrompath(pathn)##URL.file#"
    path="#pathn#"
    file="#URL.file#"> --->
    <CFHEADER
    NAME="content-disposition"
    VALUE="attachment; filename=#URL.file#">
    <CFCONTENT type="application/unknown"
    file="#pathn##URLdecode(url.module)##URL.file#"
    DeleteFile="No"></CFCONTENT>
    </CFIF>
    </cfif>
    <cfelse>
    <CFDIRECTORY ACTION="LIST"
    DIRECTORY="#pathn##urldecode(url.module)#"
    NAME="dirlist">
    <table width="487" border="0" align="center">
    <tr bgcolor="#004B8D">
    <td width="479" height="36"><span
    class="style3"> Physician Modules
    </span></td>
    <td></td>
    </tr>
    <cfif #dirlist.recordcount# gt 2>
    <CFOUTPUT QUERY="dirlist">
    <CFIF type IS 'File'>
    <tr bordercolor="##D5EBFF" bgcolor="##D5EBFF">
    <td width="479" bordercolor="##D5EBFF" bgcolor="##F4FAFF"
    class="links">
    <span class="style6"><a
    href="#cgi.SCRIPT_NAME#?module=#URLEncodedFormat(url.module)#&file=#name#"> #left(name,le n(name)-4)#</a></span>
    </td>
    <td width="50" bgcolor="##FFFFFF">
    <cfswitch expression="#right(name,3)#">
    <cfcase value="xls">
    <cfset imagesrc="/Images/excel.gif">
    </cfcase>
    <cfcase value="pdf">
    <cfset imagesrc="/Images/pdf.gif">
    </cfcase>
    <cfcase value="doc">
    <cfset imagesrc="/Images/word.gif">
    </cfcase>
    <cfcase value="ppt">
    <cfset imagesrc="/Images/powerpoint.gif">
    </cfcase>
    <cfdefaultcase>
    <cfset imagesrc="/Images/unknown.gif">
    </cfdefaultcase>
    </cfswitch>
    <div align="center"><img src="#imagesrc#" width="31"
    height="27"></div>
    </td>
    </tr>
    <cfelseif type eq 'Dir'>
    <cfif ((name neq "." ) AND (name neq "..")) >
    <cfset tempname = #url.module# & "" & #name#>
    <tr bordercolor="##D5EBFF" bgcolor="##D5EBFF">
    <td bordercolor="##D5EBFF" bgcolor="##F4FAFF"
    class="links"><a
    href="#CGI.SCRIPT_NAME#?module=#URLEncodedformat(tempname)#">#name#</a></td>
    <td bgcolor="##FFFFFF"
    class="links">Directory</td>
    </tr>
    </cfif>
    </cfif>
    </cfoutput>
    <cfelse><!--- <cfif #dirlist.recordcount# lt
    2> --->
    <tr bordercolor="#D5EBFF" bgcolor="#D5EBFF">
    <td bordercolor="#D5EBFF" bgcolor="#F4FAFF"
    class="links">
    <span class="style6">No Files
    Found</a></span></td>
    <td bgcolor="#FFFFFF"> </td>
    </tr>
    </cfif>
    </table>
    </cfif>
    <table width="100%" border="0" cellpadding="0"
    cellspacing="0" class="links">
    <tr>
    <td height="50" align="center" valign="middle"
    class="links">
    <cfinclude template="../navmenu.cfm">
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    Thanks for your help.

    You are not able to do this with CF directly.  It would be a function of the web server.
    You could move all documents other than .cfm into a folder outside of the web root, then use tags such as cfcontent to deliver those files programatically (as often happens when you download software off of a website now days).  However I suspect this isn't what you are looking for.  Just in case here is a quick example of how you may do the force download of document from outside root:  http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/force-file-download-27

  • What happened to Change Layer Content?

    This question is related to Photoshop Elements 10.
    Photoshop Elements 5.0 had the command "Change Layer Content" under the "Layers" menu. It would allow me to select from solid colors, gradients and patterns in shapes (rectangles, circles, or pre-made shapes. I used it a lot but I don't see it in this new version of Photoshop! What happened to that command? Is there some new command to replace it that I just don't see because I am really having a difficult time locating it!   

    I have some actions i made for elements to do that if your interested.
    You can do it without actions, but it's far from convenient.

  • Copy layer content between InDesign files

    Hello,
    I'm trying copy layer content between 2 files, the sources file is a Spanish version of a training manual and the target is an English version. Essentially making a single multiple language file out of two single language documents.
    I'm not well-versed in scripting.
    Thanks

    Hello Again Steve,
    Perhaps if I shared a bit more detail.
    We began with an English version. All content was placed on layer 1. At the time some of the manuals were created there was no thought of needing multiple languages.
    These files had their one layer with all placed graphics and text renamed English. The Idea was all the graphics that have text embedded in them have been edited to add the second language onto a new layer in the graphic files. (Many of the manuals share graphics between them, so a common links folder was used to maintain the library of images. The graphics files have an "art layer" and "English" layer and a "second and in some cases a third language layer added.)
    In InDesign the English layer was to be duplicated (duplicating both the graphics and the text) The text was then exported out as tagged type and translated into the second language and was to be flowed back in to the second language layer. InDesigns layer overrides would be applied to each of the duplicate images to turn off the English text layer and turn on the second language layer. One copy of all the graphics and one InDesign file containing each language layer with it's appropriate layer overrides.
    To print the thought was to turn of the language layer visibility you didn't want and turn on the language layer you did want.
    I hadn't anticipated the translation company would override the request to perform the translations in this manner and provided a single language file back instead.
    I thought it was an efficent system. A single copy of each manual to deal with and single graphic files in a common library to be maintained. At some point e-publishing is being considered and I thought one e-book with all the languages in it could be created and within the e-reader the appropriate language could be enabled. Eventually, I anticipate, and hopefully prior to the e-book effort, we will be upgrading to CS5.5 to take advantage of it's enhanced e-pub features.
    Like I said, I am new to this multiple language publication process and imaged the workflow to do the job rather slickly. Rather then having sequential languages one after another in the same book the languages would take advantage of the virtual Z dimension.
    Fewer files to maintain, if a change was made to the english version the change could be made to all language layers on the same page.
    Given your extensive experience I'd be interested in entertaining the pros and cons of sequential verses layered multlingual files. Seemed more efficient to duplicate the text in this manner then to duplicate all the graphic files. In some cases the manuals we are working with are so old (but not outdate) as to not even have digital versions. It's a big project and management within the company doesn't always think very far ahead. I'm attempting to develop a "plan" and not certain nor convinced it is the most appropriate so your advice and opinion would be recieved with great consideration. I haven't found a whole lot of resources regarding multilingual publishing. The project was sort of "thrown" at me and at the moment it's rather difficult to determine if I'm sinking or swimming. My head goes underwater but I could be doing the butterfly and that's suppose to happen.
    Right now language needs are limited to the languages with land masses attached to ours North Central and South America. International Spanish was one choice, rather then having to support each dialect. That will likely change in the upcoming years but I know of no plans when.
    Thanks again,
    Mark

  • I get a script error Chrome:/tavg/content etc I dont have chrome!!!

    Since upgrading to Firefox 5 I keep getting a script error
    (Chrome:/tavgp/content/libs/include.js:595 or :447
    usually crashes and then I get a firefox failure to respond
    Harley

    In Firefox, the word "chrome" refers to the browser frame, toolbars, etc., outside of the page.
    This appears to be a problem with one or more of your AVG add-ons. If they were not disabled, you might need to disable or update them.
    You can manage add-ons here:
    orange Firefox button ''or'' Tools menu > Add-ons
    In the left column, click the Extensions category.

Maybe you are looking for