Simple graphic block resizing Script

Hi, I have an ex-Pagemaker publication I look in Indesign, and I need to resize and move the three images on each page.  Rather than make the 125 pages manually, I'm sure it's easy to script, but vbs and scripts javascript is completely new to me (I'm on Windows) and the samples, I have watched all look too complex for what I want.

The most basic level, if someone could give me an example script showing how to define new coordinates Y, W and H (for example 27, 107 and 107mm respectively) for a selected graphic block and then adjust the content proportionally, it would speed up my day immensely :)

If I could get more automation that would be even better of course :) There are basically two blocks graphics and shading of text on each page.

The graphic block with an initial value of 32,877 mm Y must be given new values, O and H 27 mm, 107 and 107 mm;

The text block with an initial value of 129,783 mm Y should be given to a new value Y of 136mm, and the second graphic block, with an initial value of 145,287 mm Y must be given new values of, W and H 146 mm, 100mm and 19mm.

Normally, I have a macro in a program of external macro Tasker script or AutoHotKey, but for some reason, I can't seem to work reliably with InDesign, so trying to learn the "correct" way

Thank you

Kaka

Well, I say it was not tested, but I think that would be a mistake

occur if g1 was not defined, i.e. He never found an image matching

your first graphic image.

The thing to do is run the ESTK, and when there is an error,

Check the values of variables, either in the data browser, or by

typing the expressions in the JavaScript Console.

Tags: InDesign

Similar Questions

  • graphic block obscures text frame, even if the text is on a higher layer

    I have a page of photos, each in its own framework and each with its own text block containing the caption for the photo. Behind all this and covering most of the page, I created an image of basic graphics in which I placed a picture as the background. I've done several times before, as recently as last month. This time, for some reason some unfathomable background obscures the text captions, as if the background was on a top layer (but it isn't). But he isn't obscuring the photos, only the legends. Another strange thing: InDesign error text in excess, which is clearly not. I tried to juggle the autour layers to see if that would solve the problem. No dice. The only thing that makes visible captions is to completely remove the graphic block. I tried just using a fill color in the frame, instead of the photo in the background, but the result is the same. I also tried to reduce the opacity of the fill/photo, but all that is to reduce the color in the white frame (the color of the page), it doesn't make transparent. I can make the image smaller, and this makes the text 'behind' it visible. But the color/background < rectangle > is the purpose of down in the layers list. It just does not behave like that. One last thing: I can go to the layers palette and hide the rectangle of <>by clicking the eyeball, but she is hiding it, it does not show the text 'behind' she captions. I suspect that an update shifted to creative cloud can be loaded here.

    You have the text wraps not enabled for your background image, it pushes the text out of the text frame, which, of course, is causing overset text and you you see is not the text more. Select the inage background, choose the skin for Windows and click the more to the left to turn it off.

  • Can I change a Word and add simple graphics in my coverage? (Beginner)

    I made the cover and I made copies of it. I don't know if I was the cover so that I can't change it. All I want to do is change one word slightly and add a simple graphic

    I wonder if I can copy somehow a chart I put on the lid and put a second time on the cover, in a different place

    Not tell you how to put the image on the cover, but in the case where I guess the image are on a separate layer. Open the Palette layers, right-click on the image layer and choose layer duplicate the layer. Then, activate the move tool and position the image in duplicate using the buttons of the mouse or arrows.

    You said that you do not know how to open the Palette layers, then here is a brief tutorial. Keep in mind that I have ESP version 2 dinosaur, if these screenshots will be different from your version, but I hope that the process is the same. In the upper corner of the toolbar (on the right in my PSE) an area is called the well paddle. There are a bunch of pallets for various functions of the PES. You can place in the palettes of well everything that you want. I have that I use frequently.

    Click the layer to open the palette. At the bottom of the layer in the stack is the background layer. Above these are the layers that you eventually set. Here I have created layers for text and graphics:

    In your case you devriez see a layer with your additional chart. If this is not the case, let me know exactly how you have added the graph.  As I said before, it would help if you post a screenshot showing your coverage and the Layers Palette open. Since you said there was something you would post rather not (text I guess) you can temporarily black on this point prior to the screenshot.

    You can also access the toolbar palettes via the drop-down list of window:

    See your help for how to add a palette in the well.

    The advantage of having the palette layers (probably the most frequently used palette) in the well, is that you can quickly access with a single click in the well. You can also drag the Palette layers (or any other) on the desktop so that she stays there during your editing session. You likely want to do.

  • Framework 11 - group movement of objects in a graphical block

    In Framemaker 11, how can I move objects grouped in a graphic block at a specific location in the frame (by using the properties of the object, Position/size/Offset) without changing the line and fill of the grouped objects properties?  When I apply a new position of offset for objects grouped in Frame 11, the fill and line properties groupled objects (apparently) becomes a kind of default setting.  I don't want that to happen - I want that grouped all objects retain their initial line and fill properties.  I used previously to frame 9, and grouped objects preserved their initial properties after you apply the new Offset.

    When you have grouped objects and you want to use the properties of the object to move these, you must set all of the properties at AsIs everything first.

    Select each of the tabs Fill, Stroke and dressing and then click the arrow anti-clockwise at the top right to set these to AsIs first of all. Then in the Dimesions, set the top and left of the grouped objects positrons.

    Note: The clear Style button won't do it for you. It erases just any style named to be applied. You must always manually delete each property.

    This whole process (Object Styles) still needs some work by Adobe.

  • Compensation for graphic block (JS CS3)

    Hi - I know you can erase the contents of a block of text by equating the content of the narrative frame or parent «»

    Is there a method to delete an image from a graphic block, but preserving the empty frame?

    Thanks for any help.

    Hello

    You try this js code, I hope this will help you!

    myDoc var = app.activeDocument;

    var myGrapics = myDoc.allGraphics;

    for (i = 0; i
    myGrapics [i] .remove ();
    }

    Alert ("Done");

    THX

    csm_phil

  • Continuous text blurry when the image is placed in the graphic block

    I've been using InDesign for over a year and love the software. One thing continues to drive me crazy and I don't know whats going on.

    Essentially when I add a picture in a page layout, often (but not always) the text continuous blur similar to anti-aliasing is disabled (it is not). He has just done again this morning. I laid out a drop business card, text or crispy. I add a graphic block and everythings still OK. I have put my PSD file in the chassis and bang hazy continuous text. If I select and delete the graphic block text sharpens once again to the top.

    I had a lot of situations where he does the same thing, but also sometimes when it is not. I don't see any clear link between what I (or I'm not) do and why this happens. Also, I considered that it was just a display issue and it would be nice when sent to the PDF format, but the quality of the text in a PDF document is noticeable, less with the chart than without it even to the 'press' of quality.

    Any help and suggestions appreciated.

    Jon

    Check the pages Panel and see if there is a check next to the page. This indicates the transparency in the PSD.

    Is your psd have a transparent background?

    Try to open the psd and save in tiff format.

    Select your image in photoshop and create a path. Change the path for a clipping path.

    Save it as a tiff file.

    Place the tiff.

    Go to object > Clipping Path Options

    Choose the path that you created in photoshop.

    The text is still unclear? Just need to check that it is actually the PSD which is the cause, and what makes a flat tiff with a clipping path will clear up if it is.

    You just need the transparent background if you put the picture on one color other than white, usually. So if the image does not need transparency or transparency background leave it flattened with a white background, while maintaining a clipping path if you need it.

    PSD files are usually very good to place and use in InDesign.

    Well hope that helps something here.

  • Several graphic frames: resize, adjust the content proportionally, Center the content

    Hello assistants scripts! I hope one of you can help me in this simple task. How I wish that the acts were an option! I read the messages saying how from simple scripts to apple is. I have read the tutorial from start to finish and doing the exercises. I have copied excerpts from multiple sources, and the only thing I could do is to insert the content... but not proportionally.

    I use INDD CC. I have a dozen pages in tabloid format with a hundred images illustrator on each square. Here's what I have to do for everyone from graphic images:

    1. that all graphic frames the same size: 10 x 10 mm

    2. Insert the content to frame proportionally

    3 Center in the framework

    Can anyone help? Thank you!

    Hey Kevin,

    These dang millimeters! The script that I came by default to pixels of all things. So my solution (actually two scripts) isn't pretty, but it works but he paints with a broad brush... each rectangle. I hope to add a line repeat like yours, so I can see what I want. A blogger out there in the Land of script sent me a few ideas on how to combine and improve them; I hope soon to sink into their logic. These are the two that I came up with:

    Resize the frame 10 x 10 mm

    say application "Adobe InDesign CC 2014"

    activate

    say an active document

    Resize each Rectangle in internal coordinates anchor of Center of replacement of the current dimensions with values {30, 30}

    end say

    end say

    Insert the picture content (proportionally, centered)

    say application "Adobe InDesign CC 2014"

    activate

    say the active document

    say each Rectangle

    fit content to frame

    adapt given proportionally

    adapt content Center

    end say

    end say

    end say

  • Simple (I guess) Photoshop scripts quesiton ;)

    Hi guys,.

    Just a quick question...

    I looked on the forum and on the web but cannot find a working solution for my, I think that simple problem.

    I have a Photoshop image using variables and external data source (text file) to generate badges with fields such as first_name, last_name, Department,... thanks to this tutorial http://www.richmediacs.com/user_manuals/RMCS_PS_Training/using%20ps%20Variables/UsingVaria blesInPS_EXTERNAL.html (maybe there is a better way to do the same things just scripted).

    This part works well but I would add a different logo only for certain Department so I need to use something like "If Department is accounting then show accounting logo of another if Department is engineering genius show another logo display the default logo.

    How can I do?

    I forgot to say I have this will be my first Photoshop script...

    Thank you for your help...

    Vince.

    With the graphic data and data sets, you have several choices. You may have several layers of logo and use the data to the control that is visible. I think this would be the best way. You can use the dataset object to replace the content of the logo layer. It works best if the logos are the same size. One of the people could be done with simple modifications to the matrix and data sets. You may post-process the images as suggests if you cannot change the data sets.

  • random resizing script and styling

    I try to reproduce children playing "Spot on" for students in my class. http://www.blueorangegames.com/SpotIt/ I would use it for things such as vocabulary. There will be objects 440 or 220 pairs of words.

    I would like to automate as much as possible with the fusion of data and scripts. I need 3 scripts:

    1. to resize the block of text or images.

    2. to turn random frames

    3 randomly apply paragraph styles or object.

    I found this to turn. http://www.Adobe.com/cfusion/exchange/index.cfm?event=extensionDetail & extid = 1234019 I guess that it will work on CS5.

    Now I just need than the other 2. Any help will be appreciated.

    Thank you

    Eliezer

    Hello Eliezer,

    Here is the script to the point 3.

    var  doc = app.activeDocument, ol, pl, tfl,
            myObjects = doc.splineItems.everyItem().getElements();
    var   myParas = doc.stories.everyItem().paragraphs.everyItem().getElements();
    var   myTexFrames = doc.textFrames.everyItem().getElements(); // I don't know if you want this
    ol = myObjects.length;
    pl = myParas.length;
    tfl = myTexFrames.length;
    while (ol--) myObjects[ol].appliedObjectStyle = doc.objectStyles.anyItem ();
    while (pl--) myParas[pl].appliedParagraphStyle = doc.paragraphStyles.anyItem ();
    while (tfl--) myTexFrames[tfl].appliedObjectStyle = doc.objectStyles.anyItem ();
    

    If you want the script to the point 1) I'll do it for $10 (paypal) if some want else of do it for 10 points if it is not then be in touch if it's worth.

    Trevor cordially

  • HP Envy 17 t j000: Simple pass blocking my window password

    I updated my driver to scan finger print pass Simple. When I did this it stopped working. I have registered in and removed my finger because it wouldn't work and that I registered it again. According to implementing it successfully. I restarted my laptop and could not connect using my finger or my Windows password. I connected on my other laptop and changed my Windows password. I logged on this laptop and also connected on my Windows phone without problem. It seems that the Simplepass fingerprint scanner blocking both my finger and my old password and also my new password. For this reason, I can't connect to my laptop HP Envy to disable the Simple pass or fix it. Please help as soon as POSSIBLE. I don't want to make a full recovery on this laptop. Thank you

    Hi @streetrod2 ,

    Thank you for visiting the Forums HP's Support and welcome. I read your thread on your HP ENVY 17 t j000 Notebook and having issues with the software of HP SimplePass.  Thanks for all the information, it is very useful to know what you've already tried. I would say to uninstall HP SimplePass and reinstalled the latest version for Windows 8.1.

    Hope it suits it.

    Thank you.

  • Have a layer resizing script, but need to work when the layer is great than 550px

    Hello

    Fortunately, I found a script that does a layer resizing just what he needed. Only thing is, I want the script to deploy only if the current layer is more than 550px - existing code for the script is less to:

    (function (){
        var startRulerUnits = app.preferences.rulerUnits;  
        app.preferences.rulerUnits = Units.PIXELS;
        var bounds = activeDocument.activeLayer.bounds;  
        var width = bounds[2].value - bounds[0].value;
        var newSize = (100 / width) * 550;  
        activeDocument.activeLayer.resize(newSize, newSize, AnchorPosition.BOTTOMLEFT);
        app.preferences.rulerUnits = startRulerUnits;  
    })();
    

    If anyone can explain how I can use an If works, would be much appreciated!

    Thank you very much in anticipation.

    (function () {}
        var startRulerUnits = app.preferences.rulerUnits;
        app.preferences.rulerUnits = Units.PIXELS;
        var limit = activeDocument.activeLayer.bounds;
        var width = limits [2] .value - limits [0] .value;
        If {(width > 550)
        newSize = var (100 / width) * 550;
        activeDocument.activeLayer.resize (newSize, newSize, AnchorPosition.BOTTOMLEFT);
        }
        app.preferences.rulerUnits = startRulerUnits;
    })();
  • What could block a script, when there is nothing wrong with that?

    Hello, once again

    I just lost a few hours trying to get a script to run. It threw an error saying that the "object was not valid" I decided to give up, Wen home and later started home again see if I could sort.

    He did well in the first round.

    Same computer. No change to the script. ESTK has been set at 5 InDesign, I checked it a million times.

    What could cause this do? Caches overflowing? 'Blocks' between InDesign and ESTK?
    The script is not download for any URI or such.

    Here's the bit that I have problems with:

    app.activeDocument.groups.everyItem () .ungroup ();

    app.activeDocument.layers.everyItem (.locked = false);

    app.activeDocument.pageItems.everyItem (.locked = false);

    MoveTextFrame();

    function MoveTextFrame() {}

    var doc = app.activeDocument;

    stories of var = doc.stories;

    var STYLE = doc.paragraphStyles.item ("some Style");

    for (var i = stories.length - 1; i > = 0; i--) {}

    If (.appliedParagraphStyle [i] stories == STYLE & & stories [i] .paragraphs [0] .parentTextFrames [0].parentPage.name == 1) stories [i] .paragraphs [0] .parentTextFrames [0] .geometricBounds = ([38.8, 15, 48.249, 130]);

    If (.appliedParagraphStyle [i] stories == STYLE & & stories [i] .paragraphs [0] .parentTextFrames [0].parentPage.name == 2) stories [i] .paragraphs [0] .parentTextFrames [0] .geometricBounds = ([9.2, 15, 18.6, 130]);

    If (.appliedParagraphStyle [i] stories == STYLE & & stories [i] .paragraphs [0] .parentTextFrames [0].parentPage.name == 3 & & app.activeDocument.documentPreferences.facingPages == true) stories [i] .paragraphs [0] .parentTextFrames [0] .geometricBounds = ([9.2,225, 18.6, 340]);

    If (.appliedParagraphStyle [i] stories == STYLE & & stories [i] .paragraphs [0] .parentTextFrames [0].parentPage.name == 3 & & app.activeDocument.documentPreferences.facingPages == false) stories [i] .paragraphs [0] .parentTextFrames [0] .geometricBounds = ([9.2,15, 18.6, 130]);

    If (.appliedParagraphStyle [i] stories == STYLE & & stories [i] .paragraphs [0] .parentTextFrames [0].parentPage.name == 4) stories [i] .paragraphs [0] .parentTextFrames [0].move([15,9.2]);

    }

    }

    You are probably trying to separate groups that do not exist. Once you separated from everything, there is no groups, so that app.activeDocument.groups.everyItem () is invalid...

    Substances

  • Blocking Oracle script

    Hello

    I'm using oracle 11g on windows 2003 server. I stimulated oracle lock, but I want a script that should show me if the lock is dead lock or normal etc...

    Please can someone tell me what all the tables I should use to get the information?


    Thanks in advance

    There is no query to check for blockages - given that blocks are handled (or resolved immediately) by core Oracle.

    For transactional locks, you can query V$ lock, v$ locked_object, dba_blockers.

  • SWF based Image Slider causes WARNING "Blocked the Script" in Internet Explorer

    Hey guys,.

    Recently, I've coded a basic image slider/slide show in Flash CS5. Bassicly, it's just a bunch of images that slide by interpolation of movement in and out of view (like on the right side of the pizzahut.com, my insperation clients) but, when published and threw in my HTML code, it causes Internet Explorer to give the "to help protect your security, Internet Explorer has prevented this Web page to run scripts or active X Controlls" and you must click on the little bar at the top and select "Allow blocked content" to the slide show work. I coded this show in flash (published in a SWF) specifically to avoid this warniong (as opposed to J-Query) and I have sites I made of similar SWF image cursors that are not through this warning (http://www.grangerfun.com/pizza.asp) for example. Y at - it something I am doing wrong? A publication setting maybe? Thanks for your help!

    upload you your files on a server to test?

  • Simple question about calling script

    Hi people,

    I am new to flash and actionscript, so only to learn one simple question. (I have not found an answer while the former posts surf/reading again)

    If I wrote a script at the top of my project:

    btnTest1._visible = false;

    btnTest2._visible = false;

    btnTest3._visible = false;

    etc.

    I can create something to call this script in without having to re write the original code if I need to use it again, for example:

    btnTest4.onrelease = function() {}

    btnTest1._visible = false;

    btnTest2._visible = false;

    btnTest3._visible = false;

    }

    I'm looking for a way to store need to unnecessarily repeat the script

    See you soon

    Yes, you can create features and reuse them as long as they remain accessible.  Just be aware that you are showing code Actionscript 2, Actionscript 3.  Below it is rewritten in AS3...

    function hideEverything (): void {}

    btnTest1.visible = false;

    btnTest2.visible = false;

    btnTest3.visible = false;

    }

    And that the function could be further simplified because of the way you named elements (more sense if there is more than a mere 3)...

    function hideEverything (): void {}

    for (var i: uint = 1; i<4;>

    This ["btnTest" + String (i)] .visible = false;

    }

    }

    Place the strings in parentheses causes their names of proceedings for assessment.

Maybe you are looking for