Move all of the guides to a layer in InDesign (AS)

I need to select all the guides in a 20 page document and move them to a layer. The shortcut is easy enough, but when I can make a page at the same time, I'm wasting the precious time. I could really use a script. Any input?

MAC OSX 10.5.8, ID CS5 to THE choice.

Gidday KS_Coastal

Try this, paste this into the script editor, enregistrer to save as a text-file file, place it in your scripts Panel folder in indesign, you can run it then all of your work. (tested with cs5.5 10.6.8 OSX) (should work under the cs5)

Tell application "Adobe InDesign CS5.5"

If (County documents) > 0 then

My MoveGuidesToOneLayer()

on the other

display the dialog box "no documents are open."

end if

tell the end

on MoveGuidesToOneLayer()

Tell application "Adobe InDesign CS5.5"

myDoc defined for the active document

myLayerName value "Guides".

say myDoc

Try

the value myLayer to myDoc myLayerName layer

in case of error

the value myLayer to make the layer with properties {name: myLayerName}

try to end

the value of the element of each guide to myLayer layer

tell the end

tell the end

KeV

Tags: InDesign

Similar Questions

  • Move all items from carton to a layer in InDesign (AS)

    Just learning how to move all the guides to a layer, now I would like to just the products box to a layer. My goal is to separate the elements of page elements pastnoard on separate layers. Favorite AppleScript.

    It seems like it should be very simple, but I can't work as a (ID CS5, Mac OS x 10.6.8).

    If I select a point on the editing table and ask its parent, the result page is 'nothing. ' But asking you for each page element whose parent page has nothing (or 'nothing' or 'no' or 'nada' or "") returns no result.

    Can I ask for each item in the page which the parent page ID is the identification number of my single page, and you will find the item on this page (except the items in cardboard), but if I ask for each page element whose ID is NOT the ID of my page, it does not find the two points that I put on the editing table.

    Substances, can you get it actually works in JS?

    The only thing I've found so far and who works at all in AppleScript is a solution very kludgy:

    Tell application "Adobe InDesign CS5"

    Tell document 1

    each element of the page including the id of the parent page is greater than 1 the value myPageItems

    the value myEveryItem for each page element

    Repeat with myItem in myEveryItem

    If is not then myItem in myPageItems

    myItem move to the layer "layer of cardboard.

    end if

    end repeat

    tell the end

    tell the end

    That could take some time to run on a document with a lot of page elements. It is good to be a better way...!

  • Move all of the URLS in the text for references

    Hello world

    I have an interesting little problem. Basically, I have a text in which all URLS are displayed in the format < URL > < URL > www.example.org and I want to spend these coins - preferably without the < URL > - tags to references. So I decided to do this and I got far enough. I can create empty notes for each instance of < URL >(.+?) < / URL > but then when I want to move the text, I'm stumped on how to define what text should be moved without losing the location of the note to the text. So here's what I have:

    href() {} function

    var curSel = app.selection [0];

    current selection is that the script is looking through

    var searchTerm = "< URL >(.+?). < URL > ';

    Search term such as variable to facilitate the eventual later use

    app.findGrepPreferences = app.changeGrepPreferences = null;

    Reset the search parameters

    app.findGrepPreferences.findWhat = searchTerm;

    Search searchTerm

    var result = curSel.findGrep (true);

    app.findGrepPreferences = null;

    for (var f = 0; f < result.length; f ++) {}

    f is defined as 0, but if there are no more results than 0, increments f by the number of results

    curRes var = result [f];

    Defines curRes as the number of results f-> last occurrence of searchTerm in selection

    var curFootnote = curRes.footnotes.add ();

    Creates an empty reference of last instance of < URL >. + ? < URL >

    moveURL.move (LocationOptions.AFTER, curFootnote.insertionPoints [-1]);

    }

    app.findGrepPreferences = null;

    }

    I apologize for the rather silly sounding commenting in it, but I'm trying to make sure everyone with a bit of JavaScript knowledge knows that I do.

    As you can see, moveURL var is not set. var moveURL would be the function where I define the text that needs to be moved. Now, he can't be curSel because who would try to move all the text in the reference, which is just stupid for obvious reasons. curFootnote is not, because it generates the note. So what I'm doing wrong here?

    Thanks for your help!

    You don't need an 'intermediate' at all moveURL.

    The problem occurs because you add a new reference to the found object (curRes) - you can see if you add this after line of footnote.add:

    curRes.select();exit();
    

    (so please withdraw again, this is only to show how to check what is the problem).

    You can fix this, oddly enough, by adding the note before the target text:

    var curFootnote = curRes.insertionPoints[0].footnotes.add();
    

    If you check with the trick 'select', you will see the found text "curRes" still only constituted the part of the URL and the new reference appears right in front of him and not inside. When you add a note "at the end", to help

    var curFootnote = curRes.insertionPoints[-1].footnotes.add();
    

    you will find the note becomes an integral part of the "curRes" and if you can't its text more move in this same note.

    With that, it's child's play to move the text found in the note, but then you still have to remove the markers of the URL. There are several approaches, but I will copy only the text in the note, then by removing all of the text found in the document, like this:

    curRes.characters.itemByRange(6,curRes.characters.length-5).duplicate(LocationOptions.AFTER, curFootnote.insertionPoints[-1]);
    curRes.remove();
    
  • How to move all of the FORM to a Web service?

    What is the proper way to pass all of the form to a Web service? I can do my work of CFCS with 1 param, who is the FORM, but when I try to use the CFC as a Web service I get a type mismatch error. The must be a way to pass all of the form to a Web service rather than to me, creating a bunch of parameters for each element of the form, I just can't find an example of anywhere. I know I can't be the only person to ask this question.

    ..

  • Move all of the markers of the stage with clips

    My project is about half over, and I realized I want to add another element in its early days, before the start of the main band. I can easily select the soundtrack and all the clips on the video 1 track to move them all at once, but is it possible to move the markers of the scene at this very moment? I already spent the time to put in a bunch of benchmarks at times keys to the soundtrack, and I don't want to completely redo this when I move the soundtrack.

    Nope. Lock the menu markers to the timeline. Not clips. Thus, they will need to be reset manually.

  • Cursor starts to move all over the screen. How to stop it?

    Original title: cursor/mouse creeping

    I saw it everywhere and it could be here. How can I get rid of the 'MOUSE CREEPING SYSDROME". It is started without any particular reason you cursor around homelessness to the screen you upwards, downwards, means on the side, that you do not? Anyone know of a cure.

    Hello

    Visit the link of the manufacturer HP and select 32-bit or 64-bit of Windows Vista you have.

    http://h10025.www1.HP.com/ewfrf/wc/softwareCategory?cc=us&LC=en&DLC=en&product=3644726

    Try to download the

    HP Enhanced Multimedia Keyboard Driver Update
    2008-02-13, Version1.0.7.1, 5.71 M
    HP Enhanced Multimedia Keyboard Driver update fixes an issue with incorrect displayed language

    Try the following steps to check the edition of Windows Vista you are using:

    1. click the button start , enter the computer in the search box, right click on computer and then click Properties.

    2. look under Windows edition for the version and edition of Windows your PC is running.

  • my mouse works correctly, it moves all over the screen on its own

    It started this morning very well, then unexpectedly, he starts slowly his way around the screen that I have never had this before, I use a trackball mouse, I already tried rebooting but also tried another mouse and even tried just unpluging the mouse and pluging it back

    Have you tried to use canned Air to clean the mouse?

    Using the uninstall/reinstall driver?

    Is the mouse still under warranty?  Contact manufacturer for a replacement

    There are nearby facilities that could conflict with the mouse?  Router, cell phone, phone?

    Yet away from the system.

    Here are links to support Logitech on the same issue

    See the latest response/resolution on the first thread.

    http://forums.Logitech.com/T5/keyboards-and-keyboard-mice/erratic-mouse-behavior/m-p/325613 
    http://forums.Logitech.com/T5/mice-and-pointing-devices/erratic-MX-performance-mouse-issues/m-p/711968

    http://forums.Logitech.com/T5/mice-and-pointing-devices/anywhere-MX-cursor-moving-on-it-s-own/m-p/663284

    http://forums.Logitech.com/T5/mice-and-pointing-devices/bought-a-Logitech-MX620-wireless-laser-mouse-erratic-mouse/m-p/344362

  • How to move data from the old hard drive to a new operating system, games, songs, vista etc.

    you want to install more hard drive. How can I move all of the data, os, games, music, etc.

    and have computer always starts.

    Hello

    You cannot move by themselves programs

    you need to reinstall it from the original media

    read this about moving everything, including the operating system

    or save your data and reinstall clean vista

    There are different ways to do

    hard drive manufacturers will normally provide the cloning software to move your operating system installed from the old to the new hard disk

    Search for information on this subject on their Web site

    If you have vista business or ultimate, you can use the builtin vista complete PC Backup to move

    read the information below

    http://www.bleepingcomputer.com/tutorials/tutorial145.html

    or if you have vista home version you'll need 3rd party software

    link below is an example of this:

    http://www.Acronis.com/homecomputing/products/TrueImage/index.html

    also to put your machine how you bought:

    1. that vista is preinstalled, you should have a recovery on your old hard drive partition

    You can recovery disks to reinstall on your new hard drive

    ask the manufacturer of the machine how

    2. contact the computer manufacturer and ask them to send you to vista recovery disks to reinstall the operating system back as it was when you bought it

    they do it for a nominal cost of $

    3. or borrow a microsoft dvd vista

    Make sure that you borrow the correct 32-bit or 64-bit microsoft dvd to your computer

    they contain all versions of vista

    This is the product key that determines which version of vista is installed

    Save all data, because it will be lost, do the above

    How to make a backup of your data

    http://www.vista4beginners.com/how-to-backup-your-data

    How to restore your files

    http://www.vista4beginners.com/how-to-restore-files

  • Travel/table grid of squares all toward the center of the document?

    Hi all.

    We are working on a file that consists of a wide range of small squares.

    I was wondering if it is possible to move all of the squares to the center of the document... a script, or simply a method.

    Any ideas or suggestions would be greatly appreciated.

    Thank you!

    Best,

    Don

    Hi Don, I realized that the first script is only set up to manage 20 lines, so I modified it manages 120 lines, hopefully this should be sufficient.

    function main(){
    if(!documents.length) return;
    var win = new Window('dialog','Space Layers');
    g = win.graphics;
    var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]);
    g.backgroundColor = myBrush;
    win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
    win.g1 = win.p1.add('group');
    win.g1.orientation = "row";
    win.title = win.g1.add('statictext',undefined,'Space Layers');
    win.title.alignment="fill";
    var g = win.title.graphics;
    g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
    win.g5 =win.p1.add('group');
    win.g5.orientation = "row";
    win.g5.alignment='fill';
    win.g5.spacing=3;
    win.g5.st1 = win.g5.add('statictext',undefined,'Horizontal');
    win.g5.et1 = win.g5.add('edittext',undefined,'20');
    win.g5.et1.preferredSize=[50,20];
    win.g5.st1a = win.g5.add('statictext',undefined,'px');
    win.g5.st10 = win.g5.add('statictext',undefined,'');
    win.g5.st10.preferredSize=[55,20];
    win.g5.st2 = win.g5.add('statictext',undefined,'Vertical');
    win.g5.et2 = win.g5.add('edittext',undefined,'20');
    win.g5.et2.preferredSize=[50,20];
    win.g5.st2a = win.g5.add('statictext',undefined,'px');
    win.g15 =win.p1.add('group');
    win.g15.orientation = "row";
    win.g15.alignment='fill';
    win.g15.spacing=10;
    win.g15.bu1 = win.g15.add('button',undefined,'Space Layers');
    win.g15.bu1.preferredSize=[150,30];
    win.g15.bu2 = win.g15.add('button',undefined,'Cancel');
    win.g15.bu2.preferredSize=[150,30];
    if(version.substr(0,version.indexOf('.'))<10){
     alert("Sorry this script is only valid for Photoshop CS3 or higher");
     return;
    }
    win.g5.et1.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
      }
    }
    win.g5.et2.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
      }
    }
    win.g15.bu1.onClick=function(){
    if(win.g5.et1.text== ''){
        alert("No horizontal pixels entered");
        return;
        }
    if(win.g5.et2.text== ''){
        alert("No vertical pixels entered");
        return;
        }
    win.close(1);
    spaceMasks(Number(win.g5.et1.text),Number(win.g5.et2.text))
    }
    win.center();
    win.show()
    }
    function spaceMasks(spacingA,spacingD){
    var startRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var selectedLayers = getSelectedLayersIdx();
    if(selectedLayers.length <2){
        alert("Not enough layers selected!");
        return;
        }
    var boundsList=[];
    var tempbnds=[];
    showFX(false);
    for(var a=0;a (boundsList[f][2]-50) && boundsList[f][2] < (boundsList[f][2]+50)){
      eval("row" +arrayNumber).push(boundsList[f]);
      }else{
                TOP =Number(boundsList[f][2]);
       arrayNumber++;
       eval("row" +arrayNumber).push(boundsList[f]);
      }
    }
    for(var d=0;d		   
  • How do I move all clips

    Is it possible to move all of the audio and video clips to insert a new clip, for example.  At present, I am pointing out all the clips and drag.

    For the above, is there a way to get more accurate using the keyboard?

    Have you tried selecting an element in the project and then by pressing .

  • Can I move all the objects again selected layer without clicking hundreds of layer bars?

    I'm working on a complex illustrator file generated by GIS software. He gave me all kinds of groups of clip & road clip - what I really need, it's just to put all the same coloured polygons on the layer of a high level (unfortunately I can't draw all of my polygons in a group because illustrator doesn't pull these objects out of their existing clipping groups, and the card gets screwed completely upward if I release the clipping masks. With simple cards I have no problem Direct by selecting all of the polygons, I want, selecting their layers in the layers panel, then moving them to a new layer. This card is too complex, because there are hundreds of objects and hundreds of corresponding layers (they are not contiguous, or else I could simply click can be done with it).


    I used select > same > fill type to select all the polygons, I want that on a single layer, but I really hope that I don't have to select all the layers for each item one by one before I can move them to a new higher level layer. Does anyone know if there is a way to moving all the objects in a new layer selected without having to actually click all the layers in the Panel? Completely open to the alternative routes to my desired result!


    Thank you very much.

    Of course, after making the selection drag selection (to the right of the layer) icon on the desired layer. This will move any selected layer to the new layer.

  • move all the layers into a single layer

    Hello

    I am new to the script and I need to make a script that the passage of all the layers into one layer (in Illustrator I press CTRL + A and then CTRL + G in layers and works) but I need in the script

    Please could someone help me?

    Thank you!

    I found the solution

    main() {} function

    If (app.documents.length == 0) {return ;}

    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

    var doc = app.activeDocument;

    var mast = doc.layers.add ();

    Mast.Name = "original";

    var group = mast.groupItems.add ();

    var pageIt = mast.pageItems.add ();

    While (doc.layers.length > 1)

    {

    While (doc.layers [doc.layers.length - 1].pageItems.length)

    doc. Layers [doc.layers.Length - 1] .pageItems [doc.layers [doc.layers.length - 1].pageItems.length - 1] .move (grup, ElementPlacement.PLACEATBEGINNING);

    doc. Layers [doc.layers.Length - 1] .remove ();

    }

    }

  • How to move all mailboxes to the new text layer?

    Hello

    So, we work with a book that will be printed in both languages. The color plates will be the same in both, with just the black plate text change. We should have implemented in a single document with color as the base layer and the two languages as two separate layers over the top, but we do not have. So now we have the design and to move all the items of text on a new layer. I do not know this should be easy enough for anyone who knows how the script, but I don't.

    Anyone know of any scripts for it? Any other ideas?

    I use ID CS3 on Mac.

    Any help would be appreciated.

    Yes, but it should work...

    var newLayer = app.activeDocument.layers.add ();

    TFS var =

    App

    .activeDocument

    .spreads.everyItem ().textFrames.everyItem () .getElements ();

    While (var tf = {tfs.pop ())}

    TF. Move (newLayer);

    }

    Substances

  • Why are the guides in the layer panel?

    Have always shown in the layer panel guides? I swear that didn't used to be the case. However, adding a new guide throws randomly in the layers panel. Is it possible to hide the guides in the layer panel? Or at least automatically group them into their own group or layer? Guides are not a part of the work, so they really should not be included in the layer panel, or at least not treated like all other vector objects.

    DaveB... wrote:

    Guides are not a part of the work, so they really should not be included in the layer panel, or at least not treated like all other vector objects.

    Guides do not appear in the Panel layers in InDesign; they always have in Illustrator.

    They are (sort of) objects in vector Illustrator you can drag a guide from the rule and release it to a line or create a path and Cmd + 5, it a guide. This weird example has been drawn with the pencil tool and converted into a guide.

    Best example: I can draw a rectangle, Center it on the artboard, Cmd + 5 and have the margin guides.

    The answers to your questions are:

    Yes, the guides have always been in the layers panel

    Yes, you can move them to another layer the same way you move other objects (good idea)

    Yes, you can hide them with Cmd; the view menu or the eyeball in the layers panel or right-click, to name a few

    Yes, treat them as any other vector object.

  • Guide movie EI on the F5 and F55.

    I set up a guide to the movies AE for the F5 and F55. You will find here.

    http://www.XDCAM-user.com/2013/12/Cine-EI-mode-when-recording-s-log23-and-raw-on-the-F5-and-F55/

    It should guide you how to use movie EI and the benefits it offers.

    All comments, corrections etc. Welcome.

    Thanks Alister, funny enough, I also noticed this culture of centre 2K seems to be about 1/4 stop faster than full 2K on a single graphic. Can't explain it, but it seems to always be like that. Maybe I'm losing it

Maybe you are looking for