Anchor of liberation in CS2 / Javascript

Hi guys,.

I have a doubt about, liberation of the object in CS2 anchor, in CS3, we have an option, which is releaseAnchoredObject.

How to release the anchor in CS2?

Kind regards

Sudar

3 steps:

1 save the geometricBounds and spread, if error, break the process, and then copy the anchoredFrame.

2 paste an original broadcast, put the helmet in the old position, if error, break the process.

3. remove the original anchoredFrame.

Jimmy Shen

Tags: InDesign

Similar Questions

  • Anchor of liberation for group object

    Hi all

    How to release the anchor who has a group of objects, is at object - it assets to find the object anchored with group. I need to find these object anchored with Group and release anchor, if the object is placed as inline I can find other objects to anchor without a group, but not with the group. How to find and release these objects using script?

    Thank you

    Jason

    Hi Jason,

    The subject of the communication of anchored objects, a generic routine has been given here:

    http://forums.Adobe.com/message/4062574#4062574

    This is a slight adjustment that only target groups:

    var a = app.activeDocument.allPageItems,
        t;
    
    while( t = a.pop() )
        {
        t.isValid &&
        (t instanceof Group) &&
        (t.parent instanceof Character) &&
        (t=t.anchoredObjectSettings).isValid &&
        t.releaseAnchoredObject();
        }
    

    @+

    Marc

  • is it possible to increase the size of an anchor handle in illustrator cs2?

    These dots are almost beyond the capacity of my mouse resolution. 1/2 of the time something below is selected, and no, this isn't my eyes

    I don't think we can increase the size, but what I do is activate the bearings commented. So whenever the mouse is on the anchor, handle, etc. will show the name of the element. Makes it easier to select. (Click on the photo to enlarge)

    I hope this helps!

  • By clicking on OAM and scroll to an anchor in Muse.

    Hello I have a big problem with Adobe Edge animate and Muse!

    I made a button Rollover in border in the Muse. Mouseover and mouseout/mouseouthandler() functions work well.

    But my problem is: When I click on the animation I want to scroll smoothly to an anchor. My anchor is called aboutme. I don't know how to do this. I found sites like this: http://stackoverflow.com/questions/3163615/how-to-scroll-html-page-to-given-anchor-using-j request-or-javascript , but I have no idea what I have a place where.

    Someone from the community here can make me a code that I can put on board as a click event? I have really no idea/knowledge of HTML, CSS or Java and I am German (it is so hard to understand this). It must scroll too to example.com / #aboutme very smooth as normal hyperlinks in Muse.

    Julia

    Please please post it also in our social channels:

    https://www.Facebook.com/AdobeMuse

    https://Twitter.com/AdobeMuse

    Thank you

    Sanjit

  • Change an object anchor Point

    Hello

    Let me preface this with the fact that I am quite new in InDesign.

    Let's say I have a rectangle on the page. Anchor of the page occupies the Center. I got like that doesn't change, however, I want to put the new geometric limits on the rectangle with another Anchor Point.

    How can I change the anchor of an object using javascript?

    I thought that something along the lines of:

    var point = myDoc.pageItems [0];

    order of the day. ChangeObjectProperties.anchorPoint = AnchorPoint.BOTTOM_CENTER_ANCHOR;

    However, it is said that 'element' does not support the ChangeObjectProperties method.

    What can I do?

    Page elements is not the anchor points; more than pages. Window layout has a transformReferencePoint which controls the anchor for the changes in the user interface. If you assign a new geometricBounds to a page element, you basically set the coordinates of all four points of the bounding box, so anchor does not come into it. If you want to, say, double the height of a box while leaving her stockings where it is, you can use the resize() method:

    item.resize(CoordinateSpaces.INNER_COORDINATES, AnchorPoint.BOTTOM_CENTER_ANCHOR, ResizeMethods.MULTIPLYING_CURRENT_DIMENSIONS_BY, [ResizeConstraints.KEEP_CURRENT_VALUE, 2]);
    

    Transformations in InDesign are difficult, however; I certainly do not understand them. It is usually easier to just do all arithmetic you need to come up with a new geometricBounds for the page element.

    Jeff

  • tracking PDF problem

    Hello.

    I want to track numbers of pdf download, so after a manual that I put in place the HTML file.

    * Manual that I aimed

    https://community.Oracle.com/servlet/JiveServlet/downloadBody/907319-102-1-24246/Eloqua%20Async%20Tracking%20Scripts.PDF

    After mail send, I confirmed pdf download numbers.

    But I found download numbers are too small.

    Because the figures are not zero, I doubt that my settings are wrong.

    My HTML and Javascript settings are below.

    Is there something wrong?

    -----

    * HTML

    "< a href="./pdf/xxx.pdf "target ="_blank"class ="elq_pdf"> download < /a >

    * JavaScript

    $(".elq_pdf").live ("click", function() {}

    link var = $(this) .attr ("href");

    _elq.trackEvent (location.href + link.substr (2));

    });

    -----

    I want to open the pdf file in a separate window, so I do not use [onclick = "_elq.trackOutboundLink (this); return false;"] "] but [_elq.trackEvent].

    I solved it by myself.

    My link of e-mail for the destination page has settings (not for Eloqua but for other systems).

    When you click on the pdf link in the landing page, the url got 'location.href' looks like 'http://example.com?test=aaa'.

    Thus, the url sent to the Eloqua is like 'http://example.com?test=aaa/pdf/xxxx.pdf'.

    In the Eloqua, url parameter is ready for the url finally connected the Eloqua becomes "http://example.com".

    I solved this problem by cutting parameters.

    (In addition, cut the anchor tag).

    ----

    * JavaScript

    $(".elq_pdf").live ("click", function() {}

    link var = $(this) .attr ("href");

    _elq.trackEvent (location.href.replace (/(\?| #). * $/, "" ") + link.substr (2));

    });

    -----

  • A Web site can start in the footer, so you should have start scrolling upwards instead of downwards?

    A Web site can start in the footer, so you should have start scrolling upwards instead of downwards?

    Hi Jorge,.

    I'm afraid that, out of the box, is not possible. You will need some custom scripts to achieve this. You can create an anchor to point out where you want to start and then to simulate a click to the anchor via the use of JavaScript in charge.

    - Abhishek Maurya

  • Where can I get photoshop CC ScriptUI?

    I searched the internet and I can't find anything using the ScriptUI for photoshop CC.  Can someone tell me where I can get the download?

    Hi Edmccol,

    I recommend you to follow the link below to get the Scripting Guide that would have the Script INTERFACE for your project.

    Start the theme music for the page 187 of 2005 Photoshop CS2 JavaScript reference Guide:

    http://wwwimages.Adobe.com/www.Adobe.com/content/dam/Adobe/en/DevNet/Photoshop/PDFs/JavaSc riptReferenceGuide.pdf

    For more help on the same, you can do:

    http://www.Adobe.com/devnet/Photoshop/scripting.html

    Hope that helps!

    Florian

  • Connect the words specified in textframe with lines

    Hi all

    I want to use the script below, and replace it with a script that connects the words specified with lines. Now, it connects all words with lines. I don't know what to do, so I hope someone can help me.

    Thanks in advance

    #include./lib/bene.jsx
    InDesign CS2 JavaScript
    The value 4.0 script object model
    app.scriptPreferences.version = 4.0;

    ////////////////////////////////////////////////////////////////////////////////////////// ///
    var NomMonScript = app.activeScript.name;

    var myObjectList = new Array;
    If (app.documents.length! = 0) {}
    If (app.selection.length! = 0) {}
    for (var myCounter = 0; myCounter < app.selection.length; myCounter ++) {}
    switch (app.selection [myCounter].constructor.name) {}
    allow only managers of related texts
    case "TextFrame:
    myObjectList.push (app.selection [myCounter]);
    break;
    }
    }
    If (myObjectList.length! = 0) {}
    run the thing! call a function
    myConnectWords (myObjectList);
    }
    else {}
    Alert ("Please select TextFrame and try again.');
    }
    }
    else {}
    Alert ("Please select an object and try again.');
    }
    }
    else {}
    Alert ("Please open a document, select an object and try again.');
    }

    ////////////////////////////////////////////////////////////////////////////////////////// ///
    functions
    ///////////////////////////////////////////////////////////////////////////////////////// ////
    function myConnectWords (myObjectList) {}
    myDocument var = app.activeDocument;
    var myLayer, myCounter, myColor;

    Measure
    var myOldRulerOrigin = myDocument.viewPreferences.rulerOrigin;
    myDocument.viewPreferences.rulerOrigin = RulerOrigin.spreadOrigin;
    Save the units of measure.
    var myOldXUnits = myDocument.viewPreferences.horizontalMeasurementUnits;
    var myOldYUnits = myDocument.viewPreferences.verticalMeasurementUnits;
    Create the units of measurement to points.
    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;

    Get references no nuance.
    var myNoneSwatch = myDocument.swatches.item ("None");

    Create a color (if it does not already exist).
    myColor = myDocument.colors.item (myScriptName);
    try {}
    myColorName = myColor.name;
    }
    {} catch (MonErreur)
    var myColorArray = new Array (100, 0, 0, 0);
    myColor = myDocument.colors.add ({model: ColorModel.process, space: ColorSpace.CMYK, colorValue:myColorArray, name: NomMonScript});
    }

    Create a layer for the generated lines (if it does not already exist).
    myLayer = myDocument.layers.item (myScriptName);
    try {}
    myLayerName = myLayer.name;
    }
    {} catch (MonErreur)
    myLayer = myDocument.layers.add({name:myScriptName});)
    }

    Process objects (here the text blocks) in the selection.
    for (myCounter = 0; myCounter < myObjectList.length; myCounter ++) {}
    Download textframe
    var myNewFrame = myObjectList [myCounter];

    get all the lines in the frame
    var myLines = myNewFrame.lines;
    linking every word with all of the words in the following line
    for (myLineCounter = 0; myLineCounter < myLines.length - 1; myLineCounter ++) {}
    get all the words in the line + next line
    var myLine = myLines [myLineCounter] mentioning;
    var myNextLine = myLines [myLineCounter + 1] mentioning;
    myPathPoints.push([myLine.insertionPoints[-2].horizontalOffset,myTmpY]);

    Combine this + line then the words
    for (i = 0; i < myLine.length; i ++) {}
    Get the word
    var myWord_i = myLine [i];
    Table for the points
    var myPathPoints = new Array;
    Add fist point X/Y
    myPathPoints [0] = [myWord_i.horizontalOffset, myWord_i.baseline];

    for (j = 0; j < myNextLine.length; j ++) {}

    Get the word

    var myWord_j = myNextLine [j];

    If (myWord_j.baseline! = myWord_i.baseline & & myWord_j.horizontalOffset! = myWord_i.horizontalOffset) {}

    Add the second point X/Y

    myPathPoints [1] = [myWord_j.horizontalOffset, myWord_j.baseline];

    draw the line

    myDrawPolygon (myPathPoints, 1, 100, myColor, myNoneSwatch, myLayer);

    }

    }

    }

    }

    }

    myDocument.viewPreferences.rulerOrigin = myOldRulerOrigin;

    Set the units of measure to their State of origin.

    myDocument.viewPreferences.horizontalMeasurementUnits = myOldXUnits;

    myDocument.viewPreferences.verticalMeasurementUnits = myOldYUnits;

    }

    Well Yes - Fun little exercise, it was.

    Select an entire text block, or text directly, and this script logs all the words with the character style "label". The lines are at the centre of reference of each word.

    if (app.documents.length == 0 || app.selection.length != 1 ||
     !(app.selection[0] instanceof TextFrame || app.selection[0].hasOwnProperty("baseline")))
    {
     alert ("Please select a single text frame or some text first");
    } else
    {
     charStyleName = "label";
     app.findTextPreferences = null;
     app.findTextPreferences.appliedCharacterStyle = app.activeDocument.characterStyles.item(charStyleName);
     list = app.selection[0].findText();
     if (list.length == 0)
      alert ('No text found with char style "'+charStyleName+'"');
     else if (list.length == 1)
      alert ('Only one text found with char style "'+charStyleName+'", no use in going on');
     else
     {
      lpath = [];
      while (list.length)
       lpath.push ( centerOfWord (list.shift()) );
      if (app.selection[0] instanceof TextFrame)
       pg = app.selection[0].parent;
      else
       pg = app.selection[0].parentTextFrames[0];
      while (!(pg instanceof Spread || pg instanceof MasterSpread || pg instanceof Page))
      {
       if (pg instanceof Document || pg instanceof Application)
        break;
       pg = pg.parent;
      }
      l = pg.graphicLines.add({strokeWeight:0.5, strokeColor:app.activeDocument.swatches.item("Black")});
      l.paths[0].entirePath = lpath;
     }
    }
    function centerOfWord (word)
    {
     var l = word.insertionPoints[0].horizontalOffset;
     var r = word.insertionPoints[-1].horizontalOffset;
     return [ (l+r)/2, word.baseline ];
    }
    
  • Error JavaScript with Insert named anchors

    In the menu select Insert the named anchor, it gives me this error

    "When executing insertObject in Anchor.htm, a JavaScript error has occurred" and no longer works.

    Dreamweaver, ensured that I was running Java6 searched on line deleted the Cache file (MacFileCache - 41D6DDDA.dat). This has just begun. I'm under MacOSX ElCapitan 10.11.1 (updated). I use Dreamweaver CS6 (updated). Tested by creating the new html file.

    Well, since named anchors are deprecated in modern HTML code, you shouldn't use them more.

    Use unique IDS.

    #MyID">Link on the same page

    #MyID">A link to a different page

    ID = "MyID">

    some content comes here...

  • Adding anchors based on the paragraph in Javascript Style

    I've read over the documentation for days and just trying to understand how to add an anchor point to a paragraph in javascript style. That's what I have so far:

    main() {} function

    myDoc var = app.activeDocument;

    var num_pars = myDoc.stories [0].paragraphs.length;

    for (i = 0; i < num_pars; i ++) {}

    If (myDoc.stories [0].paragraphs.item (i).appliedParagraphStyle.name == "Title") {}

    aText = app.activeDocument.stories [0] .paragraphs [0];

    aDest = app.activeDocument.hyperlinkTextDestinations.add(aText,{name:aText.contents});)

    }

    }

    }

    What I am doing wrong?

    I thought about it! Thanks for your help! Here is the final code for anyone who could find that I couldn't find before:

    main() {} function

    myDoc var = app.activeDocument;

    var anchorsAddedCnt = 0;

    app.findGrepPreferences.appliedParagraphStyle = "Title";

    app.findGrepPreferences.findWhat = "^."

    var myTitleResult = myDoc.findGrep ();

    for (i = 0; i< mytitleresult.length;="" i++="" )="">

    var anchor = myDoc.hyperlinkTextDestinations.add (myTitleResult [i]);

    Anchor.Name = "A00.01.00";

    Anchor.label = "A00.01.00";

    anchorsAddedCnt += 1;

    }

    Alert ("Added" + anchorsAddedCnt + "anchors");

    $.writeln ("Added" + anchorsAddedCnt + "anchors");

    }

    main();

  • ID JS CS2 - CS3: copy items inline/anchored in a new layer...

    Hello:

    I was wondering if someone has a script to copy an object inline/embedded and place a copy of it in the same position on a new layer without him being anchored to what anyone on the new layer? I don't want to remove the embedded/inline object from the first layer. I want to just copy the size and position on a new layer.

    I would be very grateful for your help.

    Thank you!

    Theresa

    Hey!

    Try this: (this has been tested in CS5 and CS4, but it should work in CS3 as well)

    var myDoc = app.activeDocument;
    
    // use to process entire document
    var myItems = myDoc.allPageItems;
    
    // use to process just current page
    // var myItems = app.activeWindow.activePage.allPageItems;
    
    var foundObjects = Array();
    
    for(var i = 0; i < myItems.length; i++){
      if(myItems[i].parent instanceof Character){foundObjects.push(myItems[i]);}
    }
    
    if(foundObjects.length > 0){
      var myDestLayer = myDoc.layers.add({name:"Anchor/Inline Duplicates"});
      for(var i = 0; i < foundObjects.length; i++){
        var newDuplicate = foundObjects[i].duplicate(myDestLayer);
        newDuplicate.geometricBounds = foundObjects[i].geometricBounds;
        try{newDuplicate.graphics[0].geometricBounds = foundObjects[i].graphics[0].geometricBounds;}catch(_){}
      }
    }
    

    I hope that helps!

    --

    tomaxxi

    http://indisnip.WordPress.com/

  • Get objects all anchored (CS4 Javascript)

    Hello

    I'm trying to get objects all embedded in a document. That's what I came with:

    var myAOs = [];
    myItems = app.activeDocument.allPageItems;
    for (aa = 0; aa < myItems.length; aa ++) {}
    If myAOs.push (myItems [aa]) (myItems [aa] .parent instanceof character)
    }

    Is there a better way to do it?

    Thank you

    Ariel

    App.documents [0]. Stories.everyItem ().pageItems.everyItem () .getElements ();

    That you will get all the page elements anchored except those in tables and notes.

    For notes, you would add in a footnotes.everyItem (extra)

    For Tables, I think que.pageItems.everyItem () will work, but I'm not positive.

    If you need nested tables, you can use tables.allPageItems.

    Substances

  • OS 10.3 / WebView: no interaction with the Google Maps Javascript API

    Hello

    Google Maps Javascript API no longer works correctly using the Web on OS 10.3.  On all the operating system previous releases everything worked perfectly fine in WebView but on OS 10.3 even if the plan (or view, or anything else provided by Google APIs) is displayed correctly, there is no interaction whatsoever with it - no response to taps, none is panoramic, no zoom, etc.

    I don't speak of the 10.3.0.698 Simulator - I do not have access to the true OS 10.3 device.

    Even simple examples of Google Maps doesn't work, try for example:

    import bb.cascades 1.2
    
    Page {
        Container {
            preferredHeight: 720
            preferredWidth: 720
            WebView {
                preferredHeight: 720
                preferredWidth: 720
    
    url: "https://google-developers.appspot.com/maps/documentation/javascript/examples/full/marker-simple"
            }
        }
    }
    

    The map appears, but there is absolutely no interaction with it - just a STATIC content.  On OS 10.2.xxxx, it works perfectly fine...

    P.S. If you open the same example URL directly in the web browser on OS 10.3 everything works well - responds to taps, she can be zoomed, panned, etc..    So, it's apparently a problem with user agent (which is probably the same web browser both webview).  Change the user agent in WebView to e.g. Z10 user agent doesn't help, either.

    Can anyone help?

    Your sample application does not seem to suffer the original bug, I thought. That bug could cause a WebView with no ancestor ScrollView would get too small window Visual and tactile input would be anchored to the Visual display window very small. If you want to learn more on this topic, see a tale of two windows - part for the discussion of Visual and updated display on the page. Perhaps your sample application it is OK because it specifies a preferredHeight for Web display, which can affect the used Visual display window.

    To be more precise, on a real device of passport BlackBerry running OS versions 10.3.0.1052 and 10.3.0.1154, the sample you provided responds perfectly to press ENTER.

    However, on the Simulator on OS 10.3.0.698, I can confirm input touchscreen does not work. Therefore a separate bug, which seems to be specific to the Simulator.

    I think you can be assured that end users will still be able to use your app (s) on a real passport of BlackBerry device, but it is unfortunate that it does not work on the Simulator.

  • Extension of JavaScript causing a reload of the page

    Hello

    I created an extension of fast, based on dialogue by Tim Neil spinner code I found here https://github.com/tneil/WebWorks/tree/master/api/ui/Spinner/src/blackberry/ui/spinner

    Now, I have a basic function that takes a string and returns in a callback. This will be modified later to take a path of the image and returns a string containing an image of the data encoded in base64.

    Including the html from the application and function extension containing a script below.

    My problem is that on the successful recall, my 'onLoad' fuction is called again.

    Is there anyway to stop this happenning. OR I'm doing something wrong.

    See you soon.

    
    
    
    
    
    
    Invoke Extension
    
    
    
    
    ///===================================================
    
    public final class FunctionTest extends ScriptableFunction {
        public static final String NAME = "myfunction";
        private ScriptableFunction _callback = null;
    
        public Object invoke(Object obj, Object[] args) throws Exception
        {
            if (args.length == 2) {
                String strPath = (String)args[0];
                // Now get the callback method to fire
                _callback = (ScriptableFunction)args[1];
    
                Object[] result = new Object[1];
                result[0] = strPath;
                // Create a final thread safe result to pass into the thread object
                final Object[] threadedResult = result;
                // Create a new thread to make sure that the invoke of the JavaScript callback
                // does not initiate from the UI thread.  This can otherwise cause a deadlock scenario
                new Thread () {
                    public void run() {
                        try
                        {
                            // Pass the result of the spinner back to the handle of the JavaScript callback
                            _callback.invoke(_callback, threadedResult);
                        }
                        catch (Exception e) {
                            throw new RuntimeException(e.getMessage());
                        }
                    }
                }.start();
    
            }
    
            return UNDEFINED;
    
        }
    

    Reloading is caused the href = "" in your anchor tag. " A href empty, the page reloads. Try to use a button to trigger your code instead:

Maybe you are looking for