app.activeDocument.revert ();

I know that this will be easy, but it drives me crazy!

app.activeDocument.revert ();

give me a cancel / Restore dialog box

I just want back. Don't ask me if want to come back.


Help, please.

Thank you

Tell InDesign to shut up and do what it is told. (After that, however, you can find out if she has something to complain.)

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
app.activeDocument.revert();
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;

Tags: InDesign

Similar Questions

  • app.activeDocument.activeDataset.name

    Hello

    I have set up an action that I use for my batch process. I have to iterate over the [i] data sets that have unique names. I am trying to determine the name of the current index [i] data sets. I am able to read the name like this:

    Alert(App.activeDocument.dataSets[0].) (Name) / / It only reads the name of the dataset to [0] for each iteration. myset_0, myset_0, myset_0, myset_0, myset_0, myset_0, myset_0...

    The problem is that what I call for the batch using the dataset object. I can't delete the dataset from scratch, because she's going to change the length and spoil the batch.

    I want to do it like this:

    Alert (app.activeDocument.activeDataset.name); myset_0, myset_1, myset_2, myset_3, myset_4, et_5, myset_6 mys...

    but I get undefined.

    I don't know what the problem with this syntax:

    app.activeDocument.activeDataset.name

    Thank you

    Aubrey

    Try:

    app.activeDocument.activeDataSet.name;

  • Or is the error: app.activeDocument.saveAs (saveFile, saveOptions, true, Extension.LOWERCASE);

    Hello

    I have a script that works on Mac, I pass it on PC, and here he made a mistake with this message "a general photoshop error occurred. "This is may not be available in this version of photoshop.

    This is my function:

    Function to save files

    function SaveFile() {}

    var app.activeDocument.name = docRef;

    saveFile = new File(destinationFolder+"//"+docRef);

    Alert (SaveFile);

    saveOptions = new JPEGSaveOptions();

    saveOptions.embedColorProfile = true;

    saveOptions.formatOptions = FormatOptions.OPTIMIZEDBASELINE;

    saveOptions.matte = MatteType.NONE;

    saveOptions.quality = 10;

    app.activeDocument.saveAs (saveFile, saveOptions, true, Extension.LOWERCASE);

    app.activeDocument.close (SaveOptions.DONOTSAVECHANGES)

    }

    Can someone help me?

    Thank you

    "saveFile" is defined on line 14

  • Is the result of app.activeDocument.metadataPreferences a XMPMeta object?

    Hello again

    Hope this isn't a stupid question.

    I wondered if the result of

    app.activeDocument.metadataPreferences;

    is an object of XMPMeta according to "JavaScript Tools Guide.

    I would say yes, because I found examples where the previous statement is followed

    myDocXMP.setProperty (destNamespace, destNodeName, nodeValue);

    But I would also say no, because when I'm looking for

    myDocXMP.deleteProperty (destNamespace, 'CreatorTool');

    ExtendScript Toolkit, I get an error message saying "myDocXMP.deleteProperty is not a function".

    More I read, the more I get confused. Can you help me find a source of information for beginners? Thank you very much.

    Giordano

    Hello

    metadatapreferences does not have a method deleteProperty()

    Take a look: http://jongware.mit.edu/idcsjs5.5/pc_MetadataPreference.html

    These methods belong to lib: AdobeXMPScript.

    It is not as easy to manage as well. Have you tried another tool like exiftool commadline...

  • [JS CS3, win] Saving InDesign using app.activeDocument.save

    Hello.

    I have problems saving a document in InDesign using Javascript.

    My goal is to have a box in the document where I type the name of the file and the path where I want to save the InDesign file (eventually it will be generated from a datamerge).

    Then, I want to run a script that will read the contents of the box and then save the document to the file name or location.

    At the moment I have:

    SaveText.jsx
    A JavaScript InDesign CS3
    //
    Saves the document in the provided path

    get the content of the FileNameBox box on the document
    var varFileName = app.activeDocument.textFrames.item("FileNameBox").contents;
    Save now
    app.activeDocument.save ("/" + varFileName + ".indd");

    Alert (app.activeDocument.filePath);

    When I run the script (with 'Hello' in the FileNameBox) file changes its name on the top bar of InDesign to "Hello.indd", but (when I run the commented warning at the end) the file is not actually save anywhere.

    If I close InDesign, then open it the file is listed under 'Open recent' on the menu, but clicking on it does nothing - even when the file does not exist.

    Does anyone have ideas to help me to tear my hair out?

    Where is my save file? (Or, if not, how can I do save!).

    Thanks in advance for any help you can offer.

    var myFolder = new Folder ("~/Desktop/Test");
    If (! myFolder.exist) myFolder.create ();
    var varFileName = app.activeDocument.textFrames.item("FileNameBox").contents;
    app.activeDocument.save (myFolder.fsName + "\" + varFileName + ".indd");
    Alert (App.activeDocument.FilePath);

  • Illustrator Extension builder 3: app is not defined

    Hi all

    I'm writing a small extension for illustrator, this is my test code:

    function checkFunction)

    {

    try

    {

    alert() 'try catch block');

    var theDoc = app.activeDocument;

    }

      Wrestling (error( )

    {

    alert()"error caught'+);

    }

    }

    An error is caught: errorReferenceError: app is not defined.

    What is the problem in my code?

    Thank you.

    G

    What is Javascript or Extendscript?

    If this is Javascript, you must call evalScript in the CSInterface class as below.

    CSI var = new CSInterface();

    csi.evalScript ("alert (app.activeDocument.name)');

  • Let's get out the the infamous bridgetalk activedocument

    BridgeTalk is a gene. I hate the hoop jump to to get the dialog boxes and windows in the palette to interact with Illustrator.

    That said, from my testing, it seems that everything that is really needed to 'bike' a script... is the active document.

    In most of my scripts, it seems, if I get the active doc object so I can keep my script currently on the document in question.

    I was playing with this code:

    #target illustrator
    #targetengine main
    
    doc = function() {
      var bt;
      bt = new BridgeTalk();
      bt.target = 'illustrator';
      bt.body = 'foo()';
      bt.onResult = function(x) {
      $.writeln('result', x.body); // result[Document test.ai]
        // somehow return active document from onResult
      };
      bt.send();
    };
    
    
    function foo() {
      return app.activeDocument;
    }
    
    
    var activedoc = doc();
    // do something with activedoc ...
    
    // and later, like in a palette window button onclick:
    
    activedoc = doc();
    // keep workng on activedoc...
    

    It's hard for me to explain (as I write this message in frustration), but I'm trying to think of a way to make things BT simpler than what I made (and seen) in other code.

    Basically, it seems that all it takes is the activedoc. If I have the active doc then my code can continue to work on things.

    The problem is BT returns a string and not an object.

    Is long story short, possible for me to convert the string in the active document into a usable object?

    Maybe I could parse the string for the "test.ai", then a little more code allows you to enter the "activedocument" of the name of the file object?

    One of my questions make sense to anyone?

    Thank you!

    M

    Did I mention I don't like bridgetalk? It just makes so messy script... Feels hacky to me.

    but to answer you question, I don't think there's a way to transform your string into a "usable" object doc doc. In fact, you can pass the object real doc in Illustrator to javascript via BT using yourdoc.toSource (), and then rebuild the string into an object object using eval(), but you still can't talk to illustrator

  • How to make a rectangle around activeDocument.selection?

    Hello world!

    Recently, I met a terrible problem. I want to make a rectangle around the current selection, but not success.

    Could you help me or give some clues? Thank you!

    HAVE version?

    In CS3 , it works for me:

    // Box4selectedPath.jsx
    // for selected pathItems   // CS3
    // creates a green rectangle around all the selected paths (visibleBounds)
    // regards pixxxelschubser
    
    // http://forums.adobe.com/thread/1183584
    
    var StrtPOrigin = app.activeDocument.pageOrigin;
    var StrtROrigin = app.activeDocument.rulerOrigin;
    app.activeDocument.pageOrigin = Array(0,0);
    app.activeDocument.rulerOrigin = Array(0,0);
    
    var aDoc = app.activeDocument;
    var Sel = aDoc.selection;
    
    var newRGBColor = new RGBColor();
    newRGBColor.red = 0;
    newRGBColor.green = 255;
    newRGBColor.blue = 0;
    
    if (Sel.length >0 ) {
        var vBounds = Sel[0].visibleBounds;
        vBounds_Li = vBounds[0];
        vBounds_Ob = vBounds[1];
        vBounds_Re = vBounds[2];
        vBounds_Un = vBounds[3];
    
        if (Sel.length >1 ) {
    
        for (i=1; i vBdsI[0] ) {vBounds_Li = vBdsI[0]};
            if( vBounds_Ob < vBdsI[1] ) {vBounds_Ob = vBdsI[1]};
            if( vBounds_Re < vBdsI[2] ) {vBounds_Re = vBdsI[2]};
            if( vBounds_Un > vBdsI[3] ) {vBounds_Un = vBdsI[3]};
            }
        }
    
    var aRectangle = aDoc.pathItems.rectangle(vBounds_Ob, vBounds_Li, vBounds_Re - vBounds_Li, vBounds_Ob - vBounds_Un);
    aRectangle.strokeColor = newRGBColor;
    aRectangle.strokeWidth= 2;
    aRectangle.filled = false;
    aRectangle.stroked = true;
    aDoc.selection = null;
    
    } else {
        alert ("no selection")
        }
    
    app.activeDocument.pageOrigin = StrtPOrigin;
    app.activeDocument.rulerOrigin = StrtROrigin;
    

    Don't forget: only pathItems

  • Add the new page number with gaps in indesign extension app

    Hi all

    I develop an application for extension adobe indesign with adobe flex 3.4 sdk.

    the application object is to publish the document to a remote server.

    I did well all options.

    now I am facing problems to Polish.

    the problem is,

    (1) adding new page

    Let's say that a particular indesign document (portrait) contains 6 pages.

    Page 1, 2 are spread

    Page 3

    Page 4

    Page 5, 6 are spread

    Now, I will add a new page through the indesign extension.

    When I try to add a new page. It will add to the last page of the spread. (Page 5, 6)

    Finally, he became Page 5, 6 and 7 in propagation.

    What I want is.

    After you have added the new page, the document must have the following structure.

    Page 1, 2 are spread

    Page 3

    Page 4

    Page 5, 6 are spread

    Page 7

    Is my code to add the new page.

    document: var Document = app.activeDocument;

    document.pages.Add ();

    Please suggest me how to add a new page (without extension)

    Thank you

    Malaris

    Try the code below

    document: var Document = app.activeDocument;

    document.spreads.Add ();

    But make sure you use this code on a document that may be the structure of the page that had mentioned you, that is to say it must be created by unchecking the options 'facing Pages' in the dialog box new document. Otherwise, it will add two pages of the document.

    This should solve your problem.

    Manan Joshi

    -InDesign efficient Solutions

    MetaDesign - Solutions

    http://metadesignsolutions.com/services/InDesign-development.php

  • App.doc works more - stuck, please help

    I'm pretty new to javascript inside Acrobat development. I had a set of scripts to the level of records who created the buttons to work. With the help of Acrobuttons, I set them up using the model type:

    var oButton =

    {cName: "testButton",}

    cExec: DoCmdTest,.

    cEnable: "event.rc = (checkValid()) «,»»

    cMarked: "event.rc = false"

    cTooltext: "try again!"

    NPO:-1

    {cLabel: "Try again"};

    where the checkValid() function was defined above, something like this:

    checkMyValid = {app.trustedFunction (function ()}

    If (app.doc == null) {}

    Console.println ('it always it is null');

    Returns false;

    }

    other check here to see if the button should be enabled.

    in which case they return true;

    otherwise:

    Returns false;

    });

    It was everything works fine, until yesterday. Suddenly, app.doc is null to everytime. And if I use app.activeDocs [0], same result.

    Yet when I use the console with an open document, the app.doc and the app.activeDocuments [0] return my document.

    If anyone has experienced this?

    Thank you

    Jack

    Alternatively, you can test to see if a document is opened with:

    cEnable: ' event.rc = (event.target! = null); »

  • "activeDocument.saveAs" does not work! -&gt; Error 8800 | PS CS5 | Mac OSX 10.5.8

    Error 8800: General Photoshop error occurred. Maybe this feature is not available in this version of Photoshop.

    I even tried to copy the Script in the script Guide.

    jpgFile = new File( "/Temp001.jpeg" ) 
    jpgSaveOptions = new JPEGSaveOptions() 
    jpgSaveOptions.embedColorProfile = true 
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE 
    jpgSaveOptions.matte = MatteType.NONE 
    jpgSaveOptions.quality = 1 
    app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true, 
    Extension.LOWERCASE)
    

    The rest of my Scripts work :-/

    Any Tipps?

    var path = app.activeDocument.path

    jpgFile = new File( path + "/Temp001.jpeg" )
    jpgSaveOptions = new JPEGSaveOptions()
    jpgSaveOptions.embedColorProfile = true
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE
    jpgSaveOptions.matte = MatteType.NONE
    jpgSaveOptions.quality = 1
    app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true,
    Extension.LOWERCASE)

    perhaps this works

  • [JS IDCS5 Server] app.menuActions.item ("Go to Item") .invoke ();

    I have the following script applies xml attribute values to scale the image size and offset:

    #include "glue code.jsx";
    
    main();
     
    function main(){
     
    var myDoc = app.activeDocument;
    var myRuleSet = new Array (
    new findObjAttribute("//Afbeelding")
    );
     
    with(myDoc){
    var elements = xmlElements;
    __processRuleSet(elements.item(0), myRuleSet);
    }
    }
    
     
     
    function findObjAttribute(XPATH){
    this.name = "Afbeelding";
    this.xpath = XPATH;
    this.apply = function(myElement, myRuleProcessor)
    {
    with(myElement){
    try {
    var myXmove=myElement.xmlAttributes.itemByName("yoffset").value;
    var myYmove=myElement.xmlAttributes.itemByName("xoffset").value;
    var myHeight=parseInt(myElement.xmlAttributes.itemByName("height").value);
    var myWidth=parseInt(myElement.xmlAttributes.itemByName("width").value);
    var myScale=parseInt(myElement.xmlAttributes.itemByName("scale").value);
    
              app.select(myElement);
                try {
                    app.menuActions.item("Go to Item").invoke();
                    }catch(e){};
                    app.selection[0].graphics[0].move(undefined, [myYmove, myXmove]);
                    app.selection[0].geometricBounds = [0, 0, myHeight, myWidth];
                    app.selection[0].graphics[0].horizontalScale = myScale;
                    app.selection[0].graphics[0].verticalScale = myScale;
                app.selection = null;
         } 
    catch(e){};
    }
    return true;
    }
    }
    
    

    InDesign desktop it works very well. On InDesign Server, it does not work!

    app.menuActions.item("Go to Item").invoke();

    The line above does not work on InDesign Server because it has no interface? And the way to generate scripts to make it work?

    Best regards, Sjoerd

    No, no.

    You do this:

    app.select(myElement);
    ...
    app.selection[0].graphics[0].move(undefined, [myYmove, myXmove]);
    

    Never do this. If you mess with the user's selection, you're doing something wrong. It will be slow, it will mess up the State, it's probably not idempotent, and it won't work with InDesign server.

    Instead, operate directly on myElement:

    myElement.graphics[0].move(undefined, [myYmove, myXmove]);
    

    (If this does not work, you may need to adjust the exact specifier or XML element you use, or use .xmlContent or whatnot.)

  • activeDocument null after the events focused on LCD screens

    ====================================================

    Problem:

    ====================================================

    Prob 1) in a TitleWindow popup, I a Dataservice oriented LCD screens that populates an ArrayCollection «pictures» collection  See source below PreviewImage.mxml.  On a CollectionChange event on 'photos', I have a listener "dataChangeListener(event:CollectionEvent)."  In turn, this listener calls a static method NewsAgencyPhotoshop.updateMetadata (args).

    When an image is open in PS, depending on the NewsAgencyPhotoshop.updateMetadata (args) get the reference of the Photoshop document active, check if it is not zero, and proceed to update the metadata of activedocument via the "info" property  Example:

    App: application var = Photoshop.app;
    var docRef:Document = app.activeDocument;
    If (docRef! = null) {}
    var docInfo:DocumentInfo = docRef.info;

    .....

    However, every time I check if docRef is null, is null.  I use the same lines of code to get a reference to the current document in other functions like close() or writeWatermark(), and in each of these cases, the docRef object is valid (non-null).

    It seems that when a static function is called on the NewsAgencyPhotoshop manually by clicking a button or the activeDocument reference is good, but when calling a static function as an event listener for an event linked screens LCD LIQUID, then the activeDocument is always null.

    Why?

    Prob 2) I tried also to the activeDocument reference a static class variable, then the references in access to static functions.  In the open function (filePath), I instantiated the class static variables, like this:

    public static void open(filePath:String):void
    {
    App = Photoshop.app;
    var file:File;
    = new File (filePath);
    App.Open (file);
    app.activeDocument = docRef;
    }

    Using this approach, manual event-driven functions are working and have good docRefs, like this:

    Public Shared function writeWaterMark (): void
    {
    App: application var = Photoshop.app;
    var docRef:Document = app.activeDocument;
    var myTextLayerRef:ArtLayer = docRef.artLayers.add ();

    However, this works only in part with the function called by my LCDS change event listener, since the docRef is then not null it penetrates into the code block and attempts to write metadata to the activedocument, like this:

    public static void updateMetadata(filePath:String,_data:Object):void
    {
    App: application var = Photoshop.app;
    var docRef:Document = app.activeDocument;
    If (docRef! = null) {}
    var docInfo:DocumentInfo = docRef.info;
    docInfo.copyrightNotice = data.copyrightNotice;

    The problem here is that the docInfo.copyrightNotice line throws the following exception in Flash Builder:

    17/02/2011 00:08:44.226 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager routing event of type com.adobe.csxs.internally.events.BroadcastEvent to all extensions.
    : Error General Photoshop. Maybe this feature is not available in this version of Photoshop.
    -no additional information available >
    at flash.external::HostObject/__set()
    at com.adobe.csawlib::CSHostObject/hostSet()
    at com.adobe.photoshop::DocumentInfo/set copyrightNotice()
    to NewsAgencyPhotoshop$ /updateMetadata () [/ opt/Adobe_Flash_Builder4/NewsAgency_Ext/src/NewsAg encyPhotoshop.as:52]
    to PreviewImage / dataChangeListener () [/ opt/Adobe_Flash_Builder4/NewsAgency_Ext/src/PreviewIma ge.mxml:103]

    Your advice is appreciated.

    Thank you

    Steven Erat

    ====================================================

    Environment

    ====================================================

    Photoshop CS5 Extended 12,01 x 32

    Flash Builder 4

    CS SDK 1.02

    Extension Builder SDK 3.4

    MacBook Pro / OS X 10.5 / Intel Core 2 Duo clocked at 2.66 GHz / Procs: 1 / Cores: 2 / memory: 8 GB

    App, configured for Photoshop CS5 and Photoshop CS5 Extended

    ====================================================
    PreviewImage.mxml (popup)

    ====================================================

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:TitleWindow ' http://www.Adobe.com/2006/MXML "xmlns =" com.stevenerat.news. * ""
    title = "Preview Image" horizontalAlign = "center" verticalAlign = "middle" horizontalScrollPolicy = "off" verticalScrollPolicy = "off".
    paddingBottom = "20" paddingLeft = "20" paddingRight = "20" paddingTop = "20" width = "270" height = "550".
    creationComplete = "init (); ">

    ....

    < mx:Script >
    <! [CDATA]
    import flash.events.TimerEvent;
    import flash.utils.Timer;

    Import mx.events.CollectionEvent;
    Import mx.managers.PopUpManager;
    Import mx.utils.ObjectUtil;

    ....


    public void init (): void {}
    DS. Fill (pictures);
    ....
    }

    ....
    private void dataChangeListener(event:CollectionEvent): void
    {
    If (lblStatus appearing! = null & & imgIsOpen) {}
    lblStatus.text = "update of METADATA";
    setButtonState (false, true, true);
    Table: data var = event.currentTarget.list.localItems;
    for (var i: int = 0; i < data.length; i ++) {}
    If (.) Data filename [i] == this.fileName) {}
    NewsAgencyPhotoshop.updateMetadata(data[i].dirPath+data[i].fileName,data[i]);
    break;
    }
    }
    }
    }

    ....

    < mx:DataService id = "ds" destination = "NewsAgencyPhotos" autoSyncEnabled = "true" autoCommit = "false" / >
    < mx:ArrayCollection id = 'photos' collectionChange = "dataChangeListener (event)" / >
    < LocaleInvitez / >

    ====================================================

    NewsAgencyPhotoshop.as

    ====================================================

    package
    {
    import com.adobe.csawlib.photoshop.Photoshop;
    com.adobe.photoshop import. *;

    import flash.filesystem.File;
    Import mx.utils.ObjectUtil;

    public class NewsAgencyPhotoshop
    {
    public static var App: application;
    public static var docRef:Document;

    public static void open(filePath:String):void
    {
    App = Photoshop.app;
    var file:File;
    = new File (filePath);
    App.Open (file);
    app.activeDocument = docRef;
    }
    ....


    public static void updateMetadata(filePath:String,_data:Object):void
    {
    App: application var = Photoshop.app;
    var docRef:Document = app.activeDocument;
    If (docRef! = null) {}
    var docInfo:DocumentInfo = docRef.info;
    docInfo.copyrightNotice = data.copyrightNotice;
    docInfo.headline = data.headline;
    var keywordSt:String = data.keywords;
    var keywordAry: Array = keywordSt.split(",");
    for (var i: int = 0; i < keywordAry.length; i ++) {}
    docInfo.keywords [i] = keywordAry [i];
    }
    docInfo.caption = data.description;
    docInfo.city = data.city;
    docInfo.country = data.country;
    docInfo.provinceState = data.state;
    }

    ====================================================

    Console

    ====================================================

    [SWF] StageManager - 2.0.swf - 1 188 270 bytes after decompression
    17/02/2011 creationComplete() com.adobe.csxs.stagemanager.StageManager 00:08:18.971 [INFO]
    17/02/2011 00:08:18.981 [INFO] com.adobe.csxs.stagemanager.external.ExternalEventReceiver ExternalInterface callback registered.
    17/02/2011 00:08:18.982 [INFO] com.adobe.csxs.stagemanager.external.CSXSEventReceiver ExternalInterface callback registered.
    17/02/2011 com.adobe.csxs.command.GetPendingStageManagerIdCommand 00:08:18.984 [INFO] call GetPendingStageManagerId via ExternalInterface
    17/02/2011 00:08:18.993 [INFO] com.adobe.csxs.command.GetPendingStageManagerIdCommand returned branchezBranchez StageManager ID. execute()
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.026 [INFO] adding extension CH
    17/02/2011 00:08:19.027 [INFO] com.adobe.csxs.stagemanager.model.ExtensionManager add extension com.example.helloworld.extension1
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.028 [INFO] adding extension BASICAMFCONNECTOR
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.028 [INFO] adding extension CSREVIEW
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.028 [INFO] adding extension HELLOPHO
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.029 [INFO] adding extension KLR
    17/02/2011 00:08:19.029 [INFO] com.adobe.csxs.stagemanager.model.ExtensionManager add extension com.stevenerat.news.extension1
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.029 [INFO] adding extension CREATENEWCSREVIEW
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.030 [INFO] adding extension NETAVERAGES
    17/02/2011 00:08:19.030 [INFO] com.adobe.csxs.stagemanager.model.ExtensionManager add extension com.adobe.rc.mymessages
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.030 [INFO] adding extension CHWE
    17/02/2011 00:08:19.031 [INFO] com.adobe.csxs.stagemanager.model.ExtensionManager add extension com.adobe.rc.operationalmessages
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.031 [INFO] adding extension HISTORY
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.032 [INFO] adding FRIO extension
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.032 [INFO] adding extension MINIBR
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.032 [INFO] adding extension BLCSLIVE
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.033 [INFO] adding extension CHSIGNIN
    17/02/2011 com.adobe.csxs.stagemanager.model.ExtensionManager 00:08:19.033 [INFO] adding extension swfpanel-onOne-0
    17/02/2011 00:08:19.034 [INFO] com.adobe.csxs.stagemanager.extension.impl.ExtensionLoader ExtensionLoader() record ExternalInterface callback loadExtension
    17/02/2011 00:08:19.034 [INFO] com.adobe.csxs.stagemanager.extension.impl.ExtensionLoader ExtensionLoader() record ExternalInterface callback unloadExtension
    17/02/2011 checkLoadingQueue() com.adobe.csxs.stagemanager.extension.impl.ExtensionLoader 00:08:19.035 [INFO]
    17/02/2011 com.adobe.csxs.command.GetLoadingQueueCommand 00:08:19.037 [INFO] call GetLoadingQueue via ExternalInterface
    17/02/2011 00:08:19.041 [INFO] com.adobe.csxs.command.GetLoadingQueueCommand execute() branchezBranchez returned to load extensions.
    17/02/2011 00:08:19.042 [INFO] com.adobe.csxs.stagemanager.extension.impl.ExtensionLoader loadExtension() com.stevenerat.news.extension1
    17/02/2011 00:08:19.045 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager Extension com.stevenerat.news.extension1 is not an extension plugin-> validate.
    17/02/2011 com.adobe.csxs.stagemanager.security.impl.ExtensionValidator [INFO] 00:08:19.049 in debug mode, the signature of the extension is not validated.
    17/02/2011 com.adobe.csxs.command.SetExtensionSignedCommand 00:08:19.053 [INFO] call SetIsSigned via ExternalInterface
    17/02/2011 00:08:19.133 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager doLoadExtension() Extension loaded com.stevenerat.news.extension1.
    17/02/2011 onCreationComplete() com.adobe.csxs.stagemanager.window.ExtensionWindow 00:08:19.230 [INFO]
    [SWF] / Users/stevenerat/Library/Application Support/Adobe/CS5ServiceManager/extensions/com.stevenerat.news/NewsAgencyPhotos.swf - 1 976 113 bytes after decompression
    17/02/2011 com.adobe.csxs.stagemanager.window.ExtensionWindow 00:08:19.369 [INFO] com.stevenerat.news.extension1 of the extension loading complete.
    17/02/2011 com.adobe.csxs.stagemanager.window.impl.SWFEventDispatcher 00:08:19.371 [INFO] com.stevenerat.news.extension1 of the extension loading complete.
    17/02/2011 00:08:19.396 [INFO] com.adobe.csxs.stagemanager.external.CSXSEventReceiver receiveExternalEvent() send CSXSEvent to all extensions...
    17/02/2011 00:08:19.397 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager routing event of type com.adobe.csxs.internally.events.BroadcastEvent to all extensions.
    17/02/2011 onExtensionComplete() com.adobe.csxs.stagemanager.extension.impl.ExtensionLifeCycleNotifier 00:08:20.230 [INFO]
    17/02/2011 com.adobe.csxs.command.SetExtensionLoadedCommand 00:08:20.231 [INFO] call SetIsLoaded via ExternalInterface
    17/02/2011 dispatchInvokeEvent() com.adobe.csxs.stagemanager.extension.impl.ExtensionLifeCycleNotifier 00:08:20.233 [INFO]
    17/02/2011 com.adobe.csxs.command.CheckStartOnEventCommand 00:08:20.236 [INFO] CheckStartOnEvent via ExternalInterface call for com.stevenerat.news.extension1
    17/02/2011 onExtensionComplete() com.adobe.csxs.stagemanager.window.impl.WindowStateManager 00:08:20.245 [INFO]
    17/02/2011 00:08:20.252 [INFO] com.adobe.csxs.stagemanager.window.impl.SWFEventDispatcher dispatchEventToExtension() routing event type extension com.stevenerat.news.extension1 com.adobe.csxs.events::StateChangeEvent
    17/02/2011 00:08:20.257 [INFO] com.adobe.csxs.stagemanager.external.CSXSEventReceiver receiveExternalEvent() send CSXSEvent to all extensions...
    17/02/2011 00:08:20.258 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager routing event of type com.adobe.csxs.internally.events.BroadcastEvent to all extensions.
    17/02/2011 00:08:31.858 [INFO] com.adobe.csxs.stagemanager.external.CSXSEventReceiver receiveExternalEvent() send CSXSEvent to all extensions...
    17/02/2011 00:08:31.859 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager routing event of type com.adobe.csxs.internally.events.BroadcastEvent to all extensions.
    17/02/2011 00:08:33.333 [INFO] com.adobe.csxs.stagemanager.window.impl.SWFEventDispatcher dispatchEventToExtension() routing event type extension com.stevenerat.news.extension1 com.adobe.csxs.events::StateChangeEvent
    17/02/2011 00:08:36.394 [INFO] com.adobe.csxs.stagemanager.window.impl.SWFEventDispatcher dispatchEventToExtension() routing event type extension com.stevenerat.news.extension1 com.adobe.csxs.events::StateChangeEvent
    17/02/2011 00:08:36.683 [INFO] com.adobe.csxs.stagemanager.external.CSXSEventReceiver receiveExternalEvent() send CSXSEvent to all extensions...
    17/02/2011 00:08:36.683 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager routing event of type com.adobe.csxs.internally.events.BroadcastEvent to all extensions.
    17/02/2011 00:08:36.718 [INFO] com.adobe.csxs.stagemanager.external.CSXSEventReceiver receiveExternalEvent() send CSXSEvent to all

    .......
    17/02/2011 00:08:44.132 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager routing event of type com.adobe.csxs.internally.events.BroadcastEvent to all extensions.
    17/02/2011 00:08:44.190 [INFO] com.adobe.csxs.stagemanager.external.CSXSEventReceiver receiveExternalEvent() send CSXSEvent to all extensions...
    17/02/2011 00:08:44.191 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager routing event of type com.adobe.csxs.internally.events.BroadcastEvent to all extensions.
    17/02/2011 00:08:44.209 [INFO] com.adobe.csxs.stagemanager.external.CSXSEventReceiver receiveExternalEvent() send CSXSEvent to all extensions...
    17/02/2011 00:08:44.209 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager routing event of type com.adobe.csxs.internally.events.BroadcastEvent to all extensions.
    17/02/2011 00:08:44.225 [INFO] com.adobe.csxs.stagemanager.external.CSXSEventReceiver receiveExternalEvent() send CSXSEvent to all extensions...
    17/02/2011 00:08:44.226 [INFO] com.adobe.csxs.stagemanager.window.impl.WindowManager routing event of type com.adobe.csxs.internally.events.BroadcastEvent to all extensions.
    : Error General Photoshop. Maybe this feature is not available in this version of Photoshop.
    -no additional information available >
    at flash.external::HostObject/__set()
    at com.adobe.csawlib::CSHostObject/hostSet()
    at com.adobe.photoshop::DocumentInfo/set copyrightNotice()
    to NewsAgencyPhotoshop$ /updateMetadata () [/ opt/Adobe_Flash_Builder4/NewsAgency_Ext/src/NewsAg encyPhotoshop.as:52]
    to PreviewImage / dataChangeListener () [/ opt/Adobe_Flash_Builder4/NewsAgency_Ext/src/PreviewIma ge.mxml:103]
    to PreviewImage / __photos_collectionChange () [/ opt/Adobe_Flash_Builder4/NewsAgency_Ext/src/Pre viewImage.mxml:163]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.collections::ListCollectionView/dispatchEvent() [C:\autobuild\3.4.0\frameworks\projects \framework\src\mx\collections\ListCollectionView.as:862]
    at mx.collections::ListCollectionView/handlePropertyChangeEvents() [C:\autobuild\3.4.0\framew orks\projects\framework\src\mx\collections\ListCollectionView.as:1224]
    at mx.collections::ListCollectionView/listChangeHandler() [C:\autobuild\3.4.0\frameworks\proj ects\framework\src\mx\collections\ListCollectionView.as:1096]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.data::ConcreteDataService/dispatchCollectionEvent() [C:\depot\flex\branches\enterprise_ bridgeman_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:4404]
    at mx.data::ConcreteDataService/itemUpdateHandler() [C:\depot\flex\branches\enterprise_bridge man_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:4946]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.stevenerat.news::NewsPhoto/dispatchEvent() [/ opt/Adobe_Flash_Builder4/NewsAgency_Ext/s rc/com/stevenerat/news/NewsPhoto.as:26]
    at mx.data.utils::Managed$/setProperty() [C:\depot\flex\branches\enterprise_bridgeman_final_h otfixes\frameworks\mx\data\utils\Managed.as:383]
    to com.stevenerat.news::NewsPhoto/set description() [/ opt/Adobe_Flash_Builder4/NewsAgency_Ext/src/com/stevenerat/news/LocaleInvitez. as: 13]
    at mx.data::ConcreteDataService/updateManagedProperty() [C:\depot\flex\branches\enterprise_br idgeman_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:5618]
    at mx.data::ConcreteDataService/updateMergedItem() [C:\depot\flex\branches\enterprise_bridgem an_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:5638]
    at mx.data::ConcreteDataService/mergeUpdate() [C:\depot\flex\branches\enterprise_bridgeman_fi nal_hotfixes\frameworks\mx\data\ConcreteDataService.as:5155]
    to mx.data::ConcreteDataService / http://www.Adobe.com/2006/Flex/MX/internal:mergeMessage ([C:\depot\flex\branches\enterpri se_bridgeman_final_hotfixes\frameworks\mx\data\ConcreteDataService.as:2555])
    at mx.data::ConcreteDataService/messageHandler() [C:\depot\flex\branches\enterprise_bridgeman _final_hotfixes\frameworks\mx\data\ConcreteDataService.as:5199]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    to mx.messaging::AbstractConsumer / http://www.Adobe.com/2006/Flex/MX/internal:messageHandler ([C:\autobuild\3.4.0\frameworks \projects\rpc\src\mx\messaging\AbstractConsumer.as:765])
    at mx.messaging::ConsumerMessageDispatcher/messageHandler() [C:\autobuild\3.4.0\frameworks\pr ojects\rpc\src\mx\messaging\ConsumerMessageDispatcher.as:261]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.messaging::ChannelSet/messageHandler() [C:\autobuild\3.4.0\frameworks\projects\rpc\src\ mx\messaging\ChannelSet.as:1457]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.messaging.channels::NetConnectionChannel/receive() [C:\autobuild\3.4.0\frameworks\proje cts\rpc\src\mx\messaging\channels\NetConnectionChannel.as:318]

    Steven,

    You have run into a bug Photoshop Mac involving events, a description, the workaround and the library are described here:

    http://cookbooks.Adobe.com/post_Creative_Suite_5_Extensions_and_Photoshop_CS5_Redu-17727.h tml

    You can download the library.swf as a sample project from this page. As you've seen, the problem is that after receiving an event, the active document as well as other references of Photoshop DOM will be null. Workaround kicks Photoshop by the valid DOM, essentially re - run your function with a valid context.

    As the book post was written by Bob, I used workaround often successfully, of course we are also working closely with the team of Photoshop for repair. Once again, as you have seen, it is a problem for LCD screens, but it is also necessary in frameworks such as PureMVC as well as FlexUnit.

    Here is my version of a line of code, that I put at the top of each function called by these events.

    If (Utilities.shouldForceClean ()) if (PsEventScrubber.getInstance () .forceClean (this, arguments, arguments.callee)! = null) return; Workaround

    Note you mentioned creating a static function, with a static, you can't use 'this', simply replace this with your class:

    If (Utilities.shouldForceClean ()) if (PsEventScrubber.getInstance (.forceClean (MyClassHere, arguments.callee, arguments))! = null) return; Workaround

    Finally, the Utilities.shouldForceClean () is my simple check that prevents even to make the call. Although Bob wrote PsEventScrubber to do an audit of the platform, I put this to avoid calling even when not on a mac. It is also for a function that could detect bugs and avoid making the call in a future version, when it is fixed.

    /**

    * Utility to specifically target Photoshop Mac Bug - Ps Bug # 2584580

    */

    public static void shouldForceClean(): Boolean {}

    Return (flash.system.Capabilities.os.indexOf ("Mac OS") == 0);

    }

    Let us know how it works for you.

    -Mark

  • Iteration through the activeDocument.layers is very slow

    Hello

    I am trying to build a table of all visible layers currently in a document, and the only way I know how to do it is by performing an iteration (by using where loop method) app.activeDocument.layers however, the problem is it is really slow for some reason any. For 37 layers, it will sit there for about 10 to 15 seconds and the mouse pointer will fluctuate between normal and busy pointer.

    A few questions:

    (a) is there a better way to build the list of visible layers?

    (b) why it takes so long to complete this (Note: there is only a single action in the loop that is assigning the active layer in the layers panel to l):

    var layers = app.activeDocument.layers;

    for (var i = 0; i < layers.length; i ++)

    {

    var l = layers [i];

    }


    ?

    Any help on this will be appreciated!

    Thank you

    Nate

    If you have CS4, you can use the function below to get the index of the selected layers AM.

    function getSelectedLayersIdx(){
         var selectedLayers = new Array;
         var ref = new ActionReference();
         ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
         var desc = executeActionGet(ref);
         if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
              desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
              var c = desc.count
              var selectedLayers = new Array();
              for(var i=0;i
    

    There isn't really any documentation by using the Action Manager. The javascript guide that ships with Photoshop lists the properties and methods for the action descriptor, Action reference and list of actions. And the app.object methods to convert an ID.

  • app.swfExportPreferences.pageRange?

    Does anyone know how to set all pages with app.swfExportPreferences.pageRange? Each documentation tells me how for example set 1-7 pages, etc... But if I want to export all pages, is there a simple value for whom?

    P.S. Here's the script:

    myDoc var = app.activeDocument;
    app.swfExportPreferences.pageRange = PageRange.ALL_PAGES;
    var myFile = new File("~/Desktop/ScriptTest.swf");
    myDoc.exportFile (ExportFormat.SWF, myFile);

    pageRange can be PageRange enumeration or a string, for example "1", "1-3".

Maybe you are looking for

  • E-mail do not receive the error message...

    Whenever I try to send an e-mail, it goes straight to Windows Live instead of AOL, and then I get the errror message bold below. The connection to the server has failed. Subject ' Emailing: autocar.co.UK Builder', account: ' IMAP. G COM', server: ' S

  • BlackBerry Passport why my browser on BB Passport accident?

    A few weeks my passport BB guard crash the browser, regardless if I have a page or several opened, as well on WIFI and data. I tried to delete things as much as possible, I have only 9.5 GB used 32 and still nothing. Since yesterday, other applicatio

  • Lost address book entries blackBerry smartphones

    I just upgraded my 8310 BB last night to run v4.5.  After the upgrade, I found that new listings in the directory address I had recently added and were not saved on my SIM card no longer in my address book.  Is lost all hope, or is it possible to rec

  • Sync blackBerry Smartphones Gmail removal problem

    Hi all! I know this question was asked a thousand times and I apologize.  I have search and tried so many different options and nothing seems to work.  This is my last chance to try... I use gmail.  It is implemented through BIS on my curve.  I set t

  • width of the hot text push down of elements?

    HelloIs there a way to make a text box - reactive width checked-pushing down of items below text when reducing the width of the browser?Thank youIgna