The details of the path with script

An absolute beginner in InDesign and java script...

With the CS6 InDesign a document already open on my PC... I can't Open file at the path and save some/all the name of files/sub-sub-sub-folders and paper route as variables with javascript?

Path is like that: -.

------Server\PDFWorkflow\AdifCounty\GDS\InDesign\Adverts\225501IP.indd

Why? I want to write a script that gives me a Place dialog box using some original path variables.

Script dialogue place would have a path something like that: -.

------ServerAdifvariable\GDS\InDesign\resources\PDFWorkflow\-variable

app.activeDocument.filePath

Returns the path of the document. This works on recorded documents.

If you want to make any kind of file manipulation, you should read Chapter 3 on file system access in the "JavaScript Tools Guide CS6". Launch the ESTK and open the Help menu; You'll see the document in this menu.

Peter

Tags: InDesign

Similar Questions

  • Select the path using script

    Hello

    Every now and I have a lot of images to save for web (1-2 k images at once). All images are .psd or path or transparent background. I want to select the path and erease backgrount possible triming. The roads are named different, so this is another problem because the actions in photoshop select only the specific name of the track. So, it is possible to select the path regardless of his name? Or how to write the script of selection of several path names (IE "track 1", "path 2", "choice 1"...) I hope you understand what I want to do...

    I have another script that resizing of images to corect size and save for web. So when I have jpg with white backgroound first I run action in photoshop to cut images and then I run the script to resize all the images, because the script to check if the image is larger or more...

    If you want more information, just ask... I have version CS5 Photoshop

    Kind regards

    voahyeah

    Edit:

    For now, I wrote this:

    app.activeDocument.pathItems.getByName ('path 2') .makeSelection ();

    app.activeDocument.selection.invert ();

    app.activeDocument.selection.clear ();

    and he choose only if the path name is "path 2" else it stops... "."

    So when the personal is way 2 everything is fine but I have 10-15 different names... so it would be great avoid the path names. It is possible to select the first HRAP (if there is more than one)

    or if it is not possible to avoid the path name how wrote if els if block for it to check all path names...?

    ... Thank you

    Hi Voahyeah,

    Here's the Code...

    If (app.documents.length > 0) {}

    var app.activeDocument = docRef;

    var n = docRef.pathItems.length;

    If ((n>0) & (.name docRef.pathItems [0]! = "Work path")) {}

    docRef.pathItems [0] .makeSelection ();

    docRef.selection.invert ();

    docRef.selection.clear ();

    docRef.trim (TrimType.TOPLEFT);

    docRef.selection.deselect ();

    }

    };

    Kind regards

    -yajiv

  • How to select the paths with the same line width

    I would like to know how to select all the paths within a document whose line width are equal at 0.361 points

    I'd appreciate any help.

    Here you go

    #target illustrator
    
    // script.name = selectPathsThisSize.jsx;
    // script.description = selects pathItems that have the same supplied stroke width; limited to 3 decimals;
    // script.required = a document with at least one path item;
    // script.parent = CarlosCanto // 6/5/11;
    // script.elegant = false;
    
    var idoc = app.activeDocument;
    var strokewidth = prompt ("Enter Stroke Width in points of paths to be selected", 0.361, "Select Paths this size:___");
    
    for (i=0 ; i< idoc.pathItems.length; i++)
         {
              var ipath = idoc.pathItems[i];
                   if ( (ipath.strokeWidth).toFixed(3) == Number(strokewidth).toFixed(3))
                        {
                             ipath.selected = true;
                        }
         }
    
    app.redraw();
    
  • Film &gt; change the Framerate with script?

    Hi guys, I am importing sequences of images with my script, recreate the local folder structure.

    It all works very well, but now I can add an option of framerate. May specify a different framerate as by default the project. This can be done in the GUI with right click > interpret footage > main... > Frame Rate

    Is this possible with the script?

    I could find this method AVItem setProxyWithPlaceholder()... not sure that this is the best way

    Thanks in advance!

    Basically, my script works like this:

    myFolderArray = myFolder.getFiles ();

    for (i = 0; i < myFolderArray.length; i ++) {}

    If {(myFolderArray [i] instanceof file)

    var aFolder = myFolderArray [i];

    myFileArray = aFolder.getFiles ();

    var newFolder = app.project.items.addFolder (aFolder.name);

    var myImportOptions = new ImportOptions();

    If (myFileArray [0] instanceof File) {}

    aFile var = myFileArray [0];

    {if (afile)}

    myImportOptions.file = aFile;

    myImportOptions.sequence = true;

    newFile var = app.project.importFile (myImportOptions);

    newFile.parentFolder = newFolder;

    }

    }

    }

    }

    You can use the method conformFrameRate of the mainSource object.

    myImportOptions.sequence = true;

    newFile var = app.project.importFile (myImportOptions);

    newFile.parentFolder = newFolder;

    newFile.mainSource.conformFrameRate = 24;     Assign the frame here rate.

    70 pages of the guide After Effects CS6 Scripting says more.

    After effects Developer Center | Adobe Developer Connection

  • Bug of the scrollbar with script "scale to fit".

    Hello

    I meet some sort of bug with this nice script "appropriate size":

    http://sarahjustine.com/2013/04/08/create-scale-to-fit-projects-with-Adobe-edge-animate/

    I create an animation simple, consisting of a single image (step = 1024px X 3000px) with the script (see below) to do the test: everything works, the animation is snug, BUT when I resize the browser, the scroll bar keeps its original size, even if the height of the animation is very low.

    The bug concerns all popular browsers (version desktop and mobile *) except chrome.

    * I use this meta: < = happy 'viewport' meta name = "width = device-width " >

    example:

    animation = 3000px original height

    the scroll bar height = 3000px

    - - - - - - - - - - - - - -

    animation-scaled height = 600px

    height of the scroll bar does not change = 3000px

    I use no CSS, I just publish the animation with EDGE CC (not 1.5).

    Could someone give me some advice to fix this "bug"?

    Oliver.

    Sorry for my English, I'm French...

    A living example that seems to use this script (not),

    You can see the scroll bar bug if you resize the browser (IE or Firefox)

    http://www.ryanterry.NET/resume/HTML5/

    -the script (on.compositon.ready)-

    var stageHeight = sym.$('Stage').height (); Set a variable for the height of the stage

    SYM. $("#Stage") .css ({/ / set the origin of the transformation to always fit in the upper left corner of the scene})

    'transform-origin': "0 0".

    "- ms - transformation-origin": "0 0".

    ' - webkit - transform-origin ":"0 0".

    ' - moz - transform-origin ":"0 0".

    "transform - o - origin": "0 0"

    });

    function scaleStage() {}

    var point = sym.$('Stage'); Define a reusable variable to refer to the scene

    var parent = sym.$('Stage').parent (); Define a reusable variable to reference the container parent of the scene

    var parentWidth = stage.parent () .width (); Get the parent of the soundstage

    var stageWidth = stage.width (); Retrieves the width of stage

    var desiredWidth = Math.round(parentWidth * 1); Set the new width of the scene as it evolves

    var scale = (desiredWidth / stageWidth); Set a variable to calculate the new width of the scene he puts on the scale

    Resize the stage!

    internship. CSS ('transform', ' scale (' + scale + ')');

    internship. CSS ('- o - transform', ' scale (' + scale + ')');

    internship. CSS (' - SM - transform ', ' scale (' + scale + ')');

    internship. CSS (' - webkit - transform ', ' scale (' + scale + ')');

    internship. CSS (' - moz - transform ', ' scale (' + scale + ')');

    internship. CSS ('- o - transform', ' scale (' + scale + ')');

    parent. Height(stageHeight * Rescale); Reset the height of the container parent for objects below will be redistributed as the ADJUSTABLE height

    }

    When the browser is also

    $(window) .one ("Resize", function() {}

    scaleStage();

    });

    When the first load of the page

    $(document) .ready (function () {}

    scaleStage();

    });

    - - - - - - - - - - - - - - - - - - - - -

    Hey Oliver,.

    Try to encapsulate another div around the div. #Stage I think that scroll bars appear with the Animate script will recalculate the height of the parent, because if that parent is the body it is not adjusted for he thinks it is the initial height of your composition. If your HTML page will look like this:

    I found that I had to apply the height property to get it to hide the scroll bar, but the value is obsolete as it gets when even crushed by the script. Who give a shot.

    Good luck!

    Sarah

  • [JS CS3] Apply the italic with scripts

    There is a keyboard shortcut called 'Apply Italics', which is by default [cmd] + [shift] + [i] on Mac and [ctrl] + [shift] + [i] Windows. I use it often because it will change the correct italic text. E.g. text with the style '85 Heavy' will change '86 Heavy Italic' or 'Display Semibold"to"Display Semibold italic ".

    Is it possible to access the "apply Italics" with scripts? The action is not available in any menu, AFAIK.

    Yes it is possible.

    Normal:

    app.menuActions.itemByID (119609) .invoke)

    "BOLD":

    app.menuActions.itemByID (119610) .invoke)

    Italic:

    app.menuActions.itemByID (119611) .invoke)

    Highlights:

    app.menuActions.itemByID (119612) .invoke)

    With the exception of normal, these are all the toggles...

    Substances

  • When you add points on the path with the pen tool, it will always add handles almost anything?

    I'm stumped... I have used several times before the tool pen without problem. I use Wacom Intuos... but have also disconnected and used touch pad and the same thing happens... I want to add a track with the tool point pen to move and create a perfect angle and no matter what I do the pen creates the point with handles and, of course, with handles, it becomes very difficult to create and move a corners with the direct Selection tool... It certainly could be Windows or some other internal force creating the problem... I have three versions of Photoshop installed on my Alienware... Photoshop 6, CC2014 and CC2015.5.1 and it happens in all versions of three... If I'm a fool for lack of something obvious please let me know... If it's something I'm missing or have forgotten that I'd appreciate any help I can get... Peace and thanks

    The default behavior is. I just hold down the alt/opt and then convert the point at a point without handles.

  • How to activate the path with the subtractions in selection

    Hello

    This is my first post here and I must say that I thank, you are here because I'm pretty frustrated.

    I am new to using the pen tool. For the last day or two, I'm working on it pretty hard in Photoshop CC and I think I have a general handle on how it basically works now, but can't get to a domain.

    I just finished a rather complex path. After doing the outdoor path, always using the pen tool, I changed the tool of "combining forms" to "subtract the shape front" and make internal cuts of the way that I wanted. When I had finished, I thought that everything I would need to do is to hit the icon selection at the bottom of the path window and a complete selection, including the subtractions would be taken. Unfortunately when I did only the subtraction have been included in the selection even though they were clearly there in the path. Please can someone explain what can happen here?

    Thank you

    The outermost path does not have the value "Combining forms" or "Exclude the shapes overlapping" or it is not the subPathItem facing down.

    Select it, and then change the setting in the Options bar (window > Options) or simply select all the subPathItems and put them to "exclude the shapes that overlap.

  • Trace the path with the brush of the Interior

    Hey everybody!

    I'm trying to stir up a path between the panels 'WAYS', but I want to caress the inside of the track.

    now he is gone from the center of the lane.

    I don't see an option to mark Center/inside/outside similar in artificial intelligence.

    So, how PS decide trace the path of the Center? y at - it an option to change this?

    http://i.imgur.com/6dVsd.jpg

    Rather than make a path of the text, you can make a path to the center of the letters, load a selection of the text layer and then stroking the path.

  • How to get rid of confirmation on the actions with scripts dialog (multi path delete)?

    "I am using a script in actions to clear all roads, since the web found the 'activeDocument.pathItems.removeAll (); " and it works fine when it is called in the menu script not these dialogs at all but when I try to use it in shares, it still appears a dialog box asking for confirmation if I really want to remove" path regardless.

    Any help on how to perform this action without dialog would be much appreciated.

    Ty in advance.

    Try

    app.displayDialogs = DisplayModes.ERROR;

    or

    app.displayDialogs = DisplayModes.NO;

    In both cases, you probably want to reset to its original state when you are finished.

  • Alias of the path with dbms_epg

    Hi all

    At home, I have an instance of Oracle XE 11.2.0.2 with APEX 4.0.2.00.08. I use the PL/SQL gateway shipped with Apache in front.

    I would use path url aliasing better, so that when I type "http://localhost: 8080/apex/url/some nice text" locally, or "http://mysite/apex/url/some-nice-text" from a distance, it will rewrite the url to a correspondent "http://localhost: 8080/apex/f? p =... "syntax. This blogpost by Morten Bråten and here in the documentation of tell me how to do this, so here's the steps I took:

    (1) I used the dbms_epg.get_dad_list procedure to look at my current FATHER. I a: "APEX", which is the default value.
    (2) I have executed this PL/SQL block:
    begin
      dbms_epg.set_dad_attribute
      ( dad_name   => 'APEX'
      , attr_name  => 'path-alias'
      , attr_value => 'url'
      );
      dbms_epg.set_dad_attribute
      ( dad_name   => 'APEX'
      , attr_name  => 'path-alias-procedure'
      , attr_value => 'tdf$url.herschrijf'
      );
    end;
    /
    (3) the package of my TDF$ URL has this specification:
    SQL> desc tdf$url
    PROCEDURE HERSCHRIJF
     Argument Name                  Type                    In/Out Default?
     ------------------------------ ----------------------- ------ --------
     P_DAD_SUFFIX                   VARCHAR2                IN
    (4) I created a synonym public tdf$ url and the privilege to execute on ANONYMOUS.

    (5) I adjusted the wwv_flow_epg_include_mod_local procedure to allow the "TDF$ URL." HERSCHRIJF' home

    (6) the procedure of tdf$ url.herschrijf is instrumented. The first line of code a stand-alone inserts a line in my logging table, can I be sure if this procedure has a bug or it is not called at all.

    My problem is that when I enter local URL: http://localhost: 8080/apex/url/some nice-text, I get the message "not found/apex/url/some-nice-text URL requested is not found on this server." And the logging table does not contain a line, so my tdf procedure $url.herschrijf is not called.

    My question: anyone recognizes a step that I forgot to take or anyone has implemented aliasing path correctly with a configuration that resembles mine?

    Kind regards
    Rob.

    Published by: Rob van Wijk on mei/24-2011 10:48

    (bump)

    Rob van Wijk wrote:
    My problem is that when I enter local URL: http://localhost: 8080/apex/url/some nice-text, I get the message "not found/apex/url/some-nice-text URL requested is not found on this server." And the logging table does not contain a line, so my tdf procedure $url.herschrijf is not called.

    Hi Rob,

    I suggest you add the following to the configuration of the EPG, allows you to see the real/detailed error message not only the 404 error page in the browser.

      DBMS_EPG.SET_DAD_ATTRIBUTE
      ( dad_name   => 'APEX',
        attr_name  => 'error-style',
        attr_value => 'DebugStyle');
    

    For more details, see http://daust.blogspot.com/2008/04/troubleshooting-404-not-found-error-on.html

    -Morten

    http://ORA-00001.blogspot.com

    Published by: mobra on May 24, 2011 18:19

  • Customize the Dock with Script

    I'm doing an AppleScript script that puts a .app in my dock users based on the org group that they are part of Active Directory.  For example, a teacher will get a different app in the dock as a student, because they are part of another group in Active Directory.  Can someone help me with this?  Thank you!

    I do not use Active Directory, so I can't test your org group decision tree in AppleScript. But here's how you specify that a launch of the application, minimize itself to an icon in the Dock and continues in the Dock after he left running. Use GUI scripts. Tested with OS X 10.11.4.

    The following code is an adaptation of MacScripter.

    -AppleScript that launches, limit itself and remains on the dock, once it is stopped.

    game appName to 'Notes '.

    say application (my appName) to launch

    say application 'System events' to tell UI element appName of list 1 of process 'Dock '.

    perform action 'AXShowMenu '.

    click on menu item 'Options' from the menu 1

    click on menu item "Keep in Dock" from menu 1 menu item 'Options' from the menu 1

    perform action 'AXShowMenu '.

    click on menu item 'Hide' from the menu 1

    perform action 'AXShowMenu '.

    click on menu item 'Quit' from the menu 1

    end say

  • Open a file in the finder with script

    I have instructions for actions in pdf files. Trying to make a script that opens a specific folder in OS x Finder (/ applications/Adobe Photoshop CS6 / Instructions / FileNameHere).

    Is this possible. An alternative is to have only the script go to the finder and show the folder. Or if its possible also opens all files in this folder (but maybe that's not necessary if it is difficult)

    Any ideas?

    Open the folder

    var myFolder = file ('path');

    myFolder.execute ();

    Open the file

    var myFile = file (' path/file.pdf");

    myFile.execute ();

    Let the user select a folder and open all the .pdfs in the folder

    myFolder var is Folder.selectDialog ('select the file!');.

    myFiles = myFolder.getFiles ("*.pdf") var;

    for (var i = 0; i)< myfiles.length;="">

    [i] myFiles .execute ();

    };

  • Trace the path with brush gives a wavy outline...

    When I use a base with a hard edge brush and stroke a path, there an edge wavy or frizzy.  The only way I can get rid of the wavy outline is to soften the brush.  This is what looks like the hard race:

    strokePath.jpg

    Can I prevent that and still have a nice straight line?

    Thank you

    Martin

    Go to the brushes Panel, in the brush tip shape section and set the spacing of a setting below

  • Get information about the layer with script styles

    Is there a way for a script to get information about the currently existing on a layer layer styles?

    For example, can I know if a layer has a drop shadow, and that therefore, find the dimensions of this shadow, transparency, color, etc...?

    If you don't have CS4 you will need Xbytor script. With CS4, you can the the layer descriptor

    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID('layerEffects'));
    if( desc.hasKey( stringIDToTypeID('dropShadow') ) ){
         desc = desc.getObjectValue(stringIDToTypeID('dropShadow'));
         alert('opacity = '+ desc.getDouble( stringIDToTypeID('opacity') ) );
         alert('distance = '+ desc.getDouble( stringIDToTypeID('distance') ) );
         alert('spread = '+ desc.getDouble( stringIDToTypeID('chokeMatte') ) );// spread
         alert('blur = '+ desc.getDouble( stringIDToTypeID('blur') ) );
         var desc = desc.getObjectValue(stringIDToTypeID('color'));
         var r = desc.getDouble( stringIDToTypeID('red') ) ;
         var g = desc.getDouble( stringIDToTypeID('green') ) ;
         var b = desc.getDouble( stringIDToTypeID('blue') ) ;
         alert( 'r = ' + r +'\rg = ' + g + '\rb = ' + b );
    }
    

Maybe you are looking for

  • How can I make automatic numbering of tables Pages to print?

    Hello people, I recently change my old macbook to a macbook pro, so now instead of office for mac, I use Pages 5.6.1. and my problem is I can't find no option in the parameters of format that allows me to perform automatic numbering that appears for

  • Basic put in place

    where the speakers are plugged into the back of the Tower?

  • What is the size of a file folder empty?

    I am transferring my digital pictures and ask yourself what is a file folder.  My plan is to have a folder for each month that would be 120 files for 10 years... Alternatively, I could do the seasons - 40 records for 10 years - or even annual, 10 rec

  • Scratch disk is full

    So, I bought a new PC. My old version of Photoshop 2006 made my needs very well, however, on my new PC - which has a large HD (on a terabyte) - I was unable to save all the images and kept to "scratch disk is full."I tried pointing to another drive a

  • ORA-28001: the password has expired (ERROR of DBD: OCISessionBegin)

    Hello worldI have two database called orcl and LINXORCL (moved from windows to linux for oracle)My oracle_sid is orclWhen I start the orcl database I can access and connection in EM, but when I start LINXORCL and then try to access the EM make me thi