[JS][CS3] Modify SelectObjects.jsx

Looking for a modification to SelectObjects.jsx
I want to select the graphic itself and NOT the frame, just the opposite of the provided script header comment
//SelectObjects.jsx
//An InDesign CS3 JavaScript
//This script selects all objects of a given type or types on the active spread.
//When you choose one of the imported graphic types, the script will select
//the frame containing the graphic (and not the graphic itself).
if (app.documents.length != 0){...................
Thank you for all input.

Hi Slayton,
It’s totally untested:
http://www.kasyan.ho.com.ua/select_objects.html
Kasyan

Similar Messages

  • [JS][CS3] Modifying a template (ait) instance

    Hi,
    With document.height and .width being read-only properties, are we able to create a doc instance from a template and then alter its dimensions?
    The reason I want to alter dimensions is that there are bunch of ad dimensions that a user has to adhere to. I imagine the .ait file to be a storage place for all constant objects, such as logo, formatted text, etc. So instead of copying/pasting those objects between the source and target docs, I thought I'd rather modify the doc instance via script.

    You need to upload main.dropdown.js to the remote js folder

  • [JS CS3] Modify geometricBounds of Inline Frames in Overset Text

    Hello,
    I have the following setting:
    I recieve a XML file , which contains <image href="..."> tags. InDesign automatically inserts the correct images as an inline frame.
    The layout column are too small for the large images, so when placing the XML into the layout, the whole content is in the overset.
    Inline frames in the overset do not have any geometricBounds. Can I modify width & height of frames in overset text? And how do I do that?
    Thanks
    Tobias

    Thanks Robin!
    I helped myself with the following:
    with(myElement){
         // get img objects
         var theImage = myElement.xmlContent;
         var theImageFrame = theImage.parent;
         theImageFrame.appliedObjectStyle = myDocument.objectStyles.item("Img_free");
    The objectStyle "Img_free" sets the image frame from "inline" to "anchored frame". So the size of the image doesn't matter any more because its outside ("free") of the text. So everything flows into visibility and I can change whatever I want. (Yes, I must not do this with a object style, but it felt right to do so.)
    It's basically a similar way to your description. But I had hoped that there would be a somewhat "cleaner" way to do that. In my eyes it is more a workaround ...
    Any further suggestions?
    (How do people scripting InDesign Server do such things?)
    Thanks
    Tobias

  • CS3 Modify automatically external links

    I have a catalogue produced in Indesign CS3.
    All the text is via linked external files.
    Now I want to create a second language version.
    The path to the English files is something like :
    MyHardDisk/TextFiles/English/Page01
    And the pathname to the German text files is :
    MyHardDisk/TextFiles/German/Page01
    Is there anyway to change the pathname of the linked text files automatically, and not have to do it frame by frame.
    Thanks for any help
    Andy

    You might try a simple hack:
    Start by duplicating the original catalog file for whatever languages you need and rename them accordingly, Cat_German, Cat_Volapyk, etc. Ideally they should reside at some place like MyHardDisk/IDfiles/Cat_German but for our purposes it's only important that they are NOT placed in the same folder as the respective text files.
    When you have prepared all this, just go ahead and change the name of the English folder to something else. This breaks the path specified in your documents, so when you open your German file it looks for the path MyHardDisk/TextFiles/English/Page01 and finds none. The file therefore complains about the broken links and asks whether it should fix them or not. Click "Fix automatically" and you will then be offered to browse for the "missing" files. You locate the first one at MyHardDisk/TextFiles/German/Page01 and the program 'automatically fixes' the rest of the linked stories from the documents at this location.
    Problem solved.

  • How to modify labelgraphics.jsx to read custom metadata

    This script works flawlessly. However, I would like to be able to extract other XMP metadata than just
    //XMP description
            case 2:
                try{
                    myLabel = myLink.linkXmp.description;
                catch(myError){
                    myLabel = "No description available.";
                break;
            //XMP author
            case 3:
                try{
                    myLabel = myLink.linkXmp.author
                catch(myError){
                    myLabel = "No author available.";
    I have developed a custom info panel (based on the generic one) with following "properties.xml":
    <xmp_definitions xmlns:ui="http://ns.adobe.com/xmp/fileinfo/ui/">
        <xmp_schema prefix="custom0" namespace="http://my.custom0.namespace/" label="$$$/Custom0/Schema/Label=Ref_SAP" description="$$$/Custom0/Schema/Description=This example panel contains most of the options available for the 'Generic Panel'.">
            <!-- simple properties -->
            <xmp_property name="Ref_SAP" category="external" label="$$$/Custom0/Property/TextInputLabel=Referentie nummer SAP:" type="integer"/>
            <ui:separator/>
        </xmp_schema>
        <xmp_schema prefix="custom1" namespace="http://my.custom1.namespace/" label="$$$/Custom1/Schema/Label=FRANS" description="$$$/Custom1/Schema/Description=This example panel contains most of the options available for the 'Generic Panel'.">
            <!-- simple properties -->
            <xmp_property name="Titel_FR" category="external" label="$$$/Custom1/Property/TextInputLabel=Titel FR:" type="text"/>
            <xmp_property name="Tekst_FR" category="external" label="$$$/Custom1/Property/TextInputML_Label=Tekst FR:" type="text" ui:multiLine="true" ui:height="100"/>
            <ui:separator/>
        </xmp_schema>
        <xmp_schema prefix="custom2" namespace="http://my.custom2.namespace/" label="$$$/Custom2/Schema/Label=VLAAMS" description="$$$/Custom2/Schema/Description=This example panel contains most of the options available for the 'Generic Panel'.">
            <xmp_property name="Titel_VL" category="external" label="$$$/Custom2/Property/TextInputLabel=Titel VL:" type="text"/>
            <xmp_property name="Tekst_VL" category="external" label="$$$/Custom2/Property/TextInputML_Label=Tekst VL:" type="text" ui:multiLine="true" ui:height="100"/>
            <ui:separator/>
        </xmp_schema>
        <xmp_schema prefix="custom3" namespace="http://my.custom3.namespace/" label="$$$/Custom3/Schema/Label=NEDERLANDS" description="$$$/Custom3/Schema/Description=This example panel contains most of the options available for the 'Generic Panel'.">
            <xmp_property name="Titel_NL" category="external" label="$$$/Custom3/Property/TextInputLabel=Titel NL:" type="text"/>
            <xmp_property name="Tekst_NL" category="external" label="$$$/Custom3/Property/TextInputML_Label=Tekst NL:" type="text" ui:multiLine="true" ui:height="100"/>
            <ui:separator/>
        </xmp_schema>
    </xmp_definitions>
    Now I would like to adapt the LabelGraphics.js to retrieve the information stored in the fields "Titel_FR", "Tekst_FR", "Titel_VL", "Tekst_VL", "Titel_NL", Text_NL". These fields contain fixed text that goes with the image and should be retrieved in several "goes".
    Question 1: is this possible at all ?
    Question 2: how to proceed ?

    Have you already found Marijan Tompa's "Extract Metadata with Adobe XMP"?
    David

  • Changing Action Scripts outside of Photoshop CS3

    I did a search to see if anyone has figured this out, but I couldn't find anything.
    I have created several scripts that have been recorded on our main mac computer. They work great!
    But when we take and copy them to a different computer, they don't work, because our computer names are different. Everything is in the script, except maybe one name times 25 actions are wrong.
    We'll I opened the "TestAction" script using TextEdit and I see the words that need to be changed. When I made the changes and saved the file and then tried to load in Photoshop. It say's the file is not compatible with Photoshop.
    Anyone know a way to do this. It would be a huge time saving for me.
    I have CS3 and CS4 and CS2 if there is anything else needed.
    Thanks,
    Gary

    In a nutshell...
    These are the two main scripts that you will need besides creating one that does the editing/loading.removing action sets.
    http://ps-scripts.cvs.sourceforge.net/viewvc/*checkout*/ps-scripts/xtools/apps/ActionFileToXML.jsx
    http://ps-scripts.cvs.sourceforge.net/viewvc/*checkout*/ps-scripts/xtools/apps/ActionFileFromXML.jsx
    The first script ActionFileToXML.jsx is run on the action set, this will produce an editable XML file.
    Edit this file and replace the path (leaving "/filename") with something you can find/replace with ie REPLACEME
    The next thing is to create a script that will read in this xml file (to be run from Photoshop), replace the string with the correct path
    In my case it was the preset/scripts folder.
    var SCRIPTS_FOLDER =  decodeURI(app.path + '/' + localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts"));
    Write out the modified to another xml file.
    Modify ActionFileFromXML.jsx to run and process this new xml file and produce the new atn file.
    Call this from your script
    eval('//@include "'+newPath+'/actionFileFromXML.jsx";\r');
    newPath is the location of the running scripts folder.
    var newPath = decodeURI(WhoAmI().parent);
    function WhoAmI() {
    var where;
       try {var F = FO;
          }catch( err ) {where = File(err.fileName);}
       return where;
    Remove any atn file from Photoshop if it is the action set you want to replace, load the new action set.

  • InDesign CS3 JS

    I admit I am simply trying to understand JS for InDesign.
    I have written this small script to try out a few things:
    or(a = 0; a < NumberOfPages; a++)
    apage = app.activeDocument.pages.item(a);
    $.writeln("The page: ", apage.name);
    myPageItems = apage.pageItems;
    NumberOfItems = myPageItems.length;
    for(b = 0; b < NumberOfItems; b++)
    apageitem = myPageItems.item(b);
    pageItemName = apageitem.constructor.name;
    $.writeln("Page item name: ", pageItemName);
    $.writeln("Number of items: ", myPageItems.length);
    What I am trying to do is determine what kind of object each item is. The ultimate goal of this playing is to someday write a script that searches through a document for all items that use a particular color. Rectangles will require a different, simpler approach than a text frame,and I am sure there are other differences that I will have to account for. So I need to know which is which as I go through the page item list.
    With the above code, however, I am getting "PageItem" as the constructor.name for each item even though some are rectangles, and some are text boxes.
    So how do I get the correct value?
    TIA!
    John

    Hi John,
    You might want to take a look at the SelectObjects.jsx example script that's installed with InDesign. While it doesn't do what you want to do, it does show how to traverse page items on a spread and act on them according to their type and/or contents.
    Thanks,
    Ole

  • How to assign script to menu item? (JS, CS3)

    Hi All,
    I can't find out how to assign a script to a menu item. Instead of clicking a script name in the script panel, I want to appear a menu item in the menu bar. When I click that name on the menu bar I want a certain script to run.
    I've managed to put the menu item in the menu bar, but not to assign the script to it.
    many thanks
    marco

    Hi Marco,
    Here is an example:
    #targetengine "kasyan"
    var myScript1 = new File(app.filePath + "/Scripts/Scripts Panel/Preflight CS3 v3.2.jsx");
    var myScriptAction1 = app.scriptMenuActions.add("Preflight Document");
    var myEventListener1 = myScriptAction1.eventListeners.add("onInvoke", myScript1, false);
    var myScript2 = new File(app.filePath + "/Scripts/Scripts Panel/Rename Sections v3.1.jsx");
    var myScriptAction2 = app.scriptMenuActions.add("Rename Sections");
    var myEventListener2 = myScriptAction2.eventListeners.add("onInvoke", myScript2, false);
    var myScript3 = new File(app.filePath + "/Scripts/Scripts Panel/Check 100 3 SE.scpt");
    var myScriptAction3 = app.scriptMenuActions.add("Check Resolutuon of Images");
    var myEventListener3 = myScriptAction3.eventListeners.add("onInvoke", myScript3, false);
    var myScript4 = new File(app.filePath + "/Scripts/Scripts Panel/Resize Images v16.1.scpt");
    var myScriptAction4 = app.scriptMenuActions.add("Resize Images");
    var myEventListener4 = myScriptAction4.eventListeners.add("onInvoke", myScript4, false);
    try{
    var myScriptMenu = app.menus.item("$ID/Main").submenus.item("Scripts");
    myScriptMenu.title;
    catch (myError){
    var myScriptMenu = app.menus.item("$ID/Main").submenus.add("Scripts");
    var myScriptMenuItem1 = myScriptMenu.menuItems.add(myScriptAction1);
    var myScriptMenuItem3 = myScriptMenu.menuItems.add(myScriptAction3);
    var myMenuSeparator1 = myScriptMenu.menuSeparators.add();
    var myScriptMenuItem2 = myScriptMenu.menuItems.add(myScriptAction2);
    var myScriptMenuItem4 = myScriptMenu.menuItems.add(myScriptAction4);
    Kasyan

  • JSX script executed through CSXS timing out?

    So what I originally had was a simple .jsx script that I would execute from the Scripts menu. It would take several minutes to run as it iterates several hundred times making modifications to text layers.
    It came time that I wanted to upgrade the script with a Flash interface, which is what I've been working on. Since there is no true asynchronicity to be had, I've modified my .jsx script so that instead of running all in one go, the JavaScript function processes only one item at a time and returns its progress. Meanwhile the Flash interface sits in a loop, calling this function through CSXSInterface.instance.evalScript and updating a progress bar until it reads that there are no more items to process.
    Works great in theory, but for some reason the script will randomly stop around the 20th, 50th, whatever iteration, usually with a SyncResult status of InvalidInputParams (which I have NO idea how that could happen, since it's calling the exact same function with no parameters each time, and the function is returns the same XML string each time, with just a different number indicating progress).
    I tried experimentally increasing the batch size from 1 to 8 (so that the JavaScript function loops 8 times before returning back to Flash), and now it unceremoniously halts after pretty much every batch.
    Is there some kind of hidden execution timeout going on behind the scenes that is causing Flash to bail out of ActionScript when a JavaScript runs too long or something? If so, is there some way of disabling it? If not, does anyone know what could be going on here? Is there some way of dealing with this problem?
    Thanks,
    Dan.

    Sorry if it wasn't clear; this is a Flash panel running in Photoshop. CSXS is required to run the JavaScript that has access to the Photoshop DOM.
    Also, this is running CS4.
    Thanks,
    Dan.

  • How create indesign using Java Script

    I am new in indesign and want to create indesign application using JavaScript.
    When i use AppleScript to create Indesign Application i use this statement
    tell application "Adobe InDesign CS5.5"
    set myDocument to make document with properties
    end tell
    Indesign Application create sucessfully.
    How create Indesign Application using JavaScript ?
    or what is equivelent statement of ( tell application "Adobe InDesign CS5.5" ) in Java Script.
    There are some java scripting example given on forum or in sdk.These all example start with app.
    when I debug these java script using ExtendScript ToolKit 3.6 It give error on app (undefined app).I think this app ia application object.
    How create  indesign application object  app in javascript ?
    While this script run sucessfully when i put these script in C:\Program Files\Adobe\Adobe InDesign CS5.5\Scripts
    and to run these script use Scripts panel (choose Window > Utilities > Scripts), then double-click the script name in the Scripts panel in indesign application.But In this case first i start indesign application and then choose Window > Utilities > Scripts then double-click the script name in the Scripts panel.
    I want to create Indesign Application (instance) using JavaScript.When I run or (debug) my JavaScript in any javaScript tool like ExtendScript ToolKit 3.6 then Indesign application should start, like in Apple Script.
    Thanks

    Thanks Vamitul for reply
    For example when i run SelectObjects.jsx An InDesign CS5.5 JavaScript in ESTK  then message prompt "Target Adove Indesign CS5.5 is not running. Do you want to lanch." Then on click yes Indesign application start.
    I want to Know how indesign object "app" is created to start Indesign application on click yes.
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/In DesignScripting/InDesign-ScriptingTutorial.pdf
    Like in VB to create indesign object we use CreateObject("InDesign.Application"). In javascript how create object say "app" of InDesign Application.
    For example if  i write
    var myDocument = app.documents.add();
    var myTextFrame = myDocument.pages.item(0).textFrames.add();
    myTextFrame.geometricBounds = ["6p", "6p", "24p", "24p"];
    myTextFrame.contents = "Hello World!";
    in a simple text file and save it with .js extention and to open this double click on this  it give error undefined "app".
    Source :Microsoft JScript runtime error
    So how define "app" or create indesign object ?
    Thanks

  • New Image using Clipboard Dimensions

    Hello,
    I am trying to create an action that copies a selection, and creates a new image. The selection area is different in each image I want to batch process. The problem is, the action is recording the actual clipboard size when I am recording the action...not the fact that I want to use the clipboards dimensions every time. If I try to go back and edit the actions, "clipboard" is grayed out. PS used to not behave this way.
    I found a Google Cache of a blog where a guy had a script he said fixes this problem:
    http://64.233.167.104/search?q=cache:1vk4YFHP7LoJ:www.stevensacks.net/2007/09/12/major-bug -in-photoshop-cs3-actions/+copymerged.jsx&hl=en&client=firefox-a&gl=us&strip=1
    However, since his website is down, I can't get the script.
    Any ideas on where I can find this script to fix my problem?

    His site's back up. I just used the link you provided and hey presto! I have the script I needed.
    Justin

  • Indesign Image Catalog Script

    Hi,
    I need to change the current Indesign (CS3)ImageCatalog script (.jsx) to look a all files and folders on a CD not just a single folder. Does anyone know how I can do this?
    Thanks!

    The way it's supposed to be used is by changing the way you wiev files in Bridge. Disable folders, and you will see all files.
    So in Bridge choose the CD*/Folder that contains the images/folders with images you wish to use, in the Filter Panel, click on the Folder symbol, this will show all files in all folders below the containing folder.
    Selecting no files, and just running the Indesign Contact Sheet script will then use all the files.
    *(Actually you should properbly copy the files to your desktop)
    That should do the trick.

  • Modify Load Files into Stack.jsx

    I am new to Photoshop Scripting so I am sorry if this has already been answered, but I can't seem to find out the answer or figure this one out.   I am writing a script that is doing an INCLUDE using the Photoshop script Load Files into Stack.jsx.  This script seems to name the layers the Filename.  I would like to figure out how to modify this script to not include the file name in the layer and just put Layer 1, Layer 2.  Any help would be greatly appreciated. 

    That may work, but I am not sure what to put into the script and where (sorry, yes I am new at this, this is my first attempt and Photoshop scripts).  Here is what I am doing and what I have coded so far.  I have created a droplet that would move files over into Photoshop do some reformating of the images and then when I get 4 images into Photoshop I am merging the open documents into a separt document and then kicking it back over to an action to do some more formatting with the combined document.  Here is the code I have so far. 
    var loadLayersFromScript = true;
    //@includepath "/C/Program Files/Adobe/Adobe Photoshop CS5.1 (64 Bit)/Presets/Scripts/"
    //@include "Load Files into Stack.jsx"
    var files = [];
    // declare local variables for close files
    var name = activeDocument.name;
    for(var d =0;d<app.documents.length;d++){
        try{
            files.push(app.documents[d].fullName.fsName);
        }catch(e){
            alert(localize('$$$/AdobePlugin/Exposuremerge/Mustsave=Documents must be saved before they can be merged'));
    if( d > 3 ){
    loadLayers.intoStack(files,true);
    // close documents except Untitled document
    while (documents.length > 1) {
      for (var i = 0; i < documents.length; i++) {
    // close all documents except the active document
      if  (documents[i].name != "Untitled1") {
                  documents[i].close(SaveOptions.DONOTSAVECHANGES);
    doAction("Resize Canvas", "Finish Document");
    The reason I need the Layers to not be names is because the document names change and I can not get the actions to work with the differences in the Layer Names when the new files come in. 
    Any help would be GREATLY appreciated.   

  • Relinking to modified file names is working in CS3 and not in CS2

    We are trying to remove a few characters identified as illegal(cannot be used in the file names in Windows) from the file names and then modify the InDesign layout files to relink to the modified file names. We are using the InDesign CS3 server to open up the application and work on the layout files using Java and CORBA mode(used CS3 SDK). First we remove the illegal characters from the file names. Next we will go through all the links in a layout file and will identify the links with illegal characters and relink it to the modified files. The relinking will happen to only those files which has a state NORMAL before the file names are modified. This approach works fine for the CS3 files but for CS2 after the file names got modified the link rolls back to the file path on the original m/c where the link was created and the relinking is not working.
    Have anyone did something similar to that, if so can you provide with some details on how to address this issue.
    Do let me know if you need any more specific information for providing your inputs to address this issue. Any inputs will be highly appreciated.
    Thanks

    Thanks. I got it resolved by saving the document by passing in a OptArg.makeFile() instead of OptArg.noFile(). I modified this based on what I read from Adobe Livedocs which said that any CS2 file opened in CS3 will be converted to CS3 and will be considered as a new document.

  • How do I tell DW (CS3) to stop modifying my links in library snippets?

    Hi Folks,
    Is there a way to tell DW CS3 not to modify the snippet of
    code that I've added to the library for my footer?
    Specifically, I want it to leave my anchor-tag link paths
    alone.
    - GR

    Consider this -
    A library item is located in the Library folder. It contains
    a link to your
    HOME page. That link MUST look like either this -
    <a href="/index.html"
    or this -
    <a href="../index.html"
    There are no other choices. If you MANUALLY make the link in
    the Library
    item look like this -
    <a href="index.html", as you seem to be stating, then DW
    cannot manage that
    link without adding the Library folder to the path, since the
    link implies,
    nay guarantees, that the page linked to is IN THE LIBRARY
    folder.
    Stop trying to control this. Let DW do it. It works just
    fine.
    Why on EARTH would you not want DW to manage your links?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Garrett R." <[email protected]> wrote in
    message
    news:ff0n12$4mt$[email protected]..
    > Thanks for the reply Murray, glad to have you guy's
    there!
    >
    > I am relatively new to DW; although not new to editors
    and html editors.
    > Overall, I think DW is the
    > best html editor that I've ever used.
    >
    > My pages are all in the site root folder and DW knows
    that. All my links
    > are
    > about as simple as you can
    > get, like "<a href="mypage.htm">.
    >
    > I disagree that any product should feel like it must
    change a link like
    > this
    > or anything in a code-snippet. In this case it's
    redundant, annoying, and
    > it
    > was causing a problem with my local rendering, until I
    changed the links
    > back.
    > I'm getting the impression that the answer to my
    question is that there is
    > no
    > way to tell DW not to do this? I would like to have the
    ability
    > to turn "link management" off. Maybe this is something
    that the DW
    > development team would consider.
    >
    > - GR
    >

Maybe you are looking for

  • When deploying application I get [Error ORABPEL-10902]: compilation failed

    Hi all, I am have two development machines set up, one laptop with just Oracle XE and Oracle SOA installed and a desktop which has Oracle XE, Oracle SOA and Oracle10g. I am getting the following errors on the desktop environment and I am wondering wh

  • Interactive PDF in HTMLResources?

    I've figured out how to embed a pdf within the DPS project that I'm working on, however I want to be able to create some interactive navigation within the pdf? As of now, the pdf comes in without any interactivity. Is there any way to do this or is i

  • RESTORE CONTACTS, CALENDAR, AND NOTES TO IPHONE 4S

    I recently had noticed that all my Contacts, Notes, and Calendar entries are gone. How can I get these items back onto my phone. I can see them when I log in to ICloud and can see the Contacts and Calendar, but do not see the stored Notes that I mhad

  • WLS Cluster Servlet not "sticky" - continuous round robin (WLS 6.1 SP2)

              We have WLS serving as a proxy (with HttpClusterServlet) to a cluster of WLS servers           running a WebApp with in memory HttpSession replication.           However, subsequent calls from a browser continue to round robin through the c

  • ITunes won't drag and drop - AGAIN!!

    I have the current iTunes on a MacBook Pro running the current OS On several occasions, and now it's happening again, iTunes will not allow me to drag even one, let alone a batch, of tracks within or to playlists. It's not because a column is sorted