Help with script overset text?

Hi, I found this script I think it is by Laubender. Which I use for a while now and I love it. It is easier to see where the blocks of text with overset text.  My Question is.  How would change this to get rid of the fill color of Magenta (perhaps with the original color of text box before the Script ran?) after the overset text is corrected

  app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;   
  app.doScript  
    (  
    detectOverflowingTextFrames,  
    ScriptLanguage.JAVASCRIPT,  
    [],  
    UndoModes.ENTIRE_SCRIPT,  
    "Detect Overflowing TextFrames | SCRIPT"   
    );  
    
  function detectOverflowingTextFrames() {    
  var storyArray = app.documents[0].stories.everyItem().getElements();  
  var storyArrayLength = storyArray.length;  

 // A loop through all the stories of the document:  
  for(var n=0;n<storyArray.length;n++)  
  {  
    // The condition should be clear.  
    // However, there is one rare case where overflows is false,  
    // but the text frame is showing a red + sign:  
    // If a footnote text overflows in the last frame of a threaded story.  
     
    if(storyArray[n].overflows)  
    {  
      // TextContainers could be textFrames and textPaths !!  
      var textContainersArray = storyArray[n].textContainers;  
      var lastTextContainer = textContainersArray[textContainersArray.length-1];  
       
      // A function call to the last text frame, if its story overflows:  
      doSomethingWithTextContainers(lastTextContainer);  
     };  
    
  }  
    
  function doSomethingWithTextContainers(/*textFrame or textPath*/textContainer)  
  {  
    if(textContainer.constructor.name == "TextFrame") // Could be text on path as well  
    {  
      // Here your code that is changing the size of your frame  
      // In my example code here it will only fill the frame with color Magenta:  
      textContainer.fillColor = "Magenta";  
      // If you want to move the text frame, consider to unlock it first, if it is locked.  
    }  
    if(textContainer.constructor.name == "TextPath")  
    {  
      // Here your code, if text on a path should overflow.  
      // Depending on the pageItem that holds the path, the parent should be the pageItem you are interested in.  
      // Usually a graphicLine or a polygon. Could also be an oval, a rectangle or even a textFrame.  
       textContainer.parent.fillColor = "Magenta";  
       textContainer.parent.strokeColor = "Magenta";  
    }  
   
  }  
    
};  

Thank you

Alain bombaert

As long as you do not create a new text container to correct excessive; the following script should work for you.

//Scripted by ?Laubender?
//modified by Skemicle
if (parseFloat(app.version) < 6)
main();
else
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Splice Image Along Path");
function main() {
    var doc = app.activeDocument;
    var stories = doc.stories;
    for(s=0;s 
         

Tags: InDesign

Similar Questions

  • Help with script distributed switches Reporting

    Hello everyone, my name is Sebastian and I have a question for the VMware community.

    I need to know what network card physical and ESX are connected to a distributed switch. I've found that for Virtual Switch: Re: help with vSwitch reporting script. I would do the same thing with DvSwitch.

    Any idea?

    Thank you very much in advance for your help.

    Kind regards

    Sébastien.

    Take a look at 1. Re: get NIC host assigned to a dvSwitch  

  • Need help with the "stationary" text box

    Hola

    Why the "stationary" text box do not appear in this page? Welcome to TummyTime, 4 d 3D Ultrasound, Salida, Modesto, Ceres, Turlock area.

    The text of "stationary" should appear as you go over the photos at the bottom of the page in the ANGELS RECENT section.

    As see you in this page (under the heading 'Our projects'):model HOME - Arctic

    the "stationary" text box appear as you go "on" image, but in "my" page is not.

    Now, when I have "preview" in my computer, I can see the "text box" appear but when I download, it just does not work.

    Can you please check it out and help me with this you problem?

    Thank you.

    OK, now is fix.
    The problem is in a js.scripts, was a syntax error, and I stop the script of twitter to watch.
    It is therefore fix :-)

    A big thank you to you all.

    Saludos

  • Need help with a typewriter text effect

    Hi, could you guys look over my script and see what happens? I wish that the words in the string type in the allotted time, but for some reason any my apends the first and last letter function what anyone in the chain, so "Hello?" becomes "ello". It is not affected if I touch the text in the string with spaces, i.e. "Hello?" Neither this work if I start I have account to-1, not 0. Help, please.

    import flash.utils.Timer;
    import flash.events.TimerEvent;

    var str:String = "Hello";

    var i: int = - 1;
    var delay: int = 720%str.length;

    var: timer = new Timer (delay);

    Timer.Start ();

    timer.addEventListener (TimerEvent.TIMER, gotime);

    function gotime(e:TimerEvent)
    {

    textbox_txt. AppendText (Str.charAt (i));
    i ++ ;
    If (I > = str.length)
    {
    Timer.Stop ();
    }
    }

    I should start at 0.  The code works fine then you might need to see if you need to incorporate your policy in the textfield to get it to display.

  • help with script Math.Random display)

    OK, after help on another thread I managed to get this script


    var r_text = new Array ();
    r_text [0] = "all the leaves are brown;
    r_text [1] = "and the sky is gray."
    r_text [2] = "I was for a walk."
    r_text [3] = "on a winter day.
    r_text [4] = 'I'd be safe and warm. "
    r_text [5] = "If I is in L.A."
    r_text [6] = "California dreaming, such a winter day;
    var i = Math.floor (7 * Math.random ())

    document. Write (r_text [i]);

    who will work on webpages when updated, but I need it to operate when a button is pressed and displayed in a text field in my pdf

    I'm a total noob with javascript only to start learning today so as much help that pos will be great thanks in advance

    Instead of this line:

    document. Write (r_text [i]);

    You need to use something like this:

    this.getField("Field_name").value = r_text [i];

    Or if you use it as the custom text field calculation script:

    Event.Value = r_text [i];

  • Help with script from beginner to the data store and hard drives

    Hello

    I am quite new to scripting, and recently, I created a monstrosity below.

    The problem is with the results. I have no idea why in the results I get the name of the virtual machine and its data store over and over again until all disks are highlighted.

    Any help will be very very much appreciated.

    The script:

    $raport = @)

    Foreach ($i in (Get-Content "Y:\vms.txt"))

    {

    $rekord = «»

    $vm = get-vm-name '$i '.

    $dysk1 = $vm | Get-hard drive | where {$_.} Name - eq 'Disk 1'}

    $datastore1 = $dysk1.filename.split("]") [0].split("[") [1]

    $disks = $vm | Get-hard drive

    {foreach ($disk in $disks)

    $hd = «»

    $disksize = ($disk. CapacityGB)

    $hd += $disksize

    {$rekord += $vm.name + ";" + $datastore1 + ";" + $hd}

    $raport += $rekord

    }

    $raport | out-file 'Y:\dyski.csv '.

    The results in csv:

    VM1Name; datastoreName; 60; VM1Name:datastoreName; 50; VM1Name; datastoreName; 40

    VM2Name; datastoreName; 45; VM2Name; datastoreName; 40

    The results of dream in csv:

    VM1Name; datastoreName; 60; 50 40

    VM2Name; datastoreName; 45 40

    etc.

    Try like this

    $raport = @)

    Foreach ($i in (Get-Content "Y:\vms.txt"))

    {

    $rekord = «»

    $vm = get-vm-name '$i '.

    $disk = $vm | Get-hard drive

    $datastore = ($disk | where {$_.}) Name - eq "disk 1" hard}).filename.split ("]") [0].split("[") [1].

    $rekord = "$($vm.)". The name); $($datastore); $(($disk | sélectionnez-ExpandProperty CapacityGB)-join ' |') »

    $raport += $rekord

    }

    $raport | out-file 'Y:\dyski.csv '.

  • Need help with scaling the text

    I need to make a text vertically taller, but seem to have a problem with the scale tool. That's what I'm starting with:

    Screen Shot 2015-09-25 at 9.50.15 AM.png

    And when I try to step up that I end up with this:

    Screen Shot 2015-09-25 at 9.50.49 AM.png

    Any help would be greatly appreciated. Thank you!

    Use the scale options in the character, as in this case Panel

  • Help with script to change the network name.

    Hello

    I made a small script to help me rename the label of network on a portgroup and then correct the label of network on all the virtual machines with this label.

    I came across the problem that it could not update on the virtual machines network label because the portgroup did not exist (this must be because it does not wait for the first order at the end?). I fixed that by doing a line with: "Start-Sleep-seconds 10.

    The script works, but I don't like the solution with 10 sec sleep because it could go wrong if the portgroup takes more than 10 seconds to create (unlikly).

    I tried different things, for example "Wait-task" but without success.

    any ideas?

    $esxi = Read-host "enter the IP address of the host."

    $portgroup_old = Read-host "Enter the name of the portgroup you wish to rename.

    $portgroup_new = Read-host "enter the new name of the portgroup.

    Get-VMHost-name $esxi | Get-VirtualPortGroup-name $portgroup_old | Game-VirtualPortGroup-name $portgroup_new

    Start-Sleep - seconds 10

    Get-VMHost-name $esxi | Get - VM | Get-NetworkAdapter | Where {$_.NetworkName - eq $portgroup_old} | Together-NetworkAdapter - NetworkName $portgroup_new - confirm: $false

    Unfortunately, with groups of standard port vSwitch, that's what you're stuck with.

    You could try a loop 'while' like this instead:

    Get-VMHost-name $esxi | Get-VirtualPortGroup-name $portgroup_old | Game-VirtualPortGroup-name $portgroup_new

    While (Get-VMHost-name $esxi |) Get - VM | Get-NetworkAdapter | Where {$_.NetworkName - eq $portgroup_old})

    {Get-VMHost-name $esxi |} Get - VM | Get-NetworkAdapter | Where {$_.NetworkName - eq $portgroup_old} | {Set-NetworkAdapter - NetworkName $portgroup_new - confirm: $false}

  • Help with Action Adv &amp; text entry

    Hello, can someone help me create the measures following advanced (I think that's what I need).

    When a learner types 'A' in a text input field, the 'excellent' word appears (on the next page in a summary text box)

    When a learner tape 'B' in a text input field, the word "property" is displayed (on the next page in a summary text box)

    When the letters 'C' 'd', or 'F' is typed in a text entry field nothing shows up. "

    Thanks in advance!

    Traci

    Hello

    Do not validate the TEB, but you will need to include a conditional action advanced as action of success. I don't know if you also want to ensure that there is an entry? And what must happen even when another character was typed? I would like to create a custom rather than generic user variable attached to the ETB (easier to understand action): v_answer. And for this example I expect a click on the button submit, or use the shortcut entry (default for TEB). This will be the event triggering the advanced action

    On the next page, create two text containers (you don't tell what version? I say text container because you can use both a legend or a form) with the text you want to appear and hide them (in the properties panel). I have them tagged the txt_Excel and txt_Good.

    Your conditional action needs two decisions:

    First great decision

    IF v_answer is equal to A

    Go to the next slide

    See the txt_Excel

    Second good decision

    IF v_answer is equal to B

    Go to the next slide

    See the txt_Good

    ON THE OTHER

    Go to the next slide

    Lilybiri



  • I need help with dynamic input text

    I am developing a game and I have a problem with my dynamic input text. I am doing my input text appear on other images whenever I click on the button, well, I tried a few solutions I've seen here, but it hasn't really well.
    This is the first code I used:

    Stop();

    function handleClick(pEvent:MouseEvent):void {}

    var myfirstVariable = box1.text;

    Welcome.Text = "Welcome to the game" + myfirstVariable;

    }

    enter_button.addEventListener (MouseEvent.MOUSE_UP, handleClick);

    This works but only on an image. and this is the code I'm trying to use now:

    Stop();

    var enteredText:String;

    welcome.addEventListener (Event.CHANGE, updateString);

    function updateString(evt:Event) {}

    enteredText = welcome.text;

    }

    enter_button.addEventListener (MouseEvent.MOUSE_UP, handleClick);

    and on the other images:

    Stop();

    enteredText = welcome_2.text;

    Thank you much for the help ^^

    If you change the images have an another textfield on this new framework, you must set its text property to:

    enteredText = welcome_2.text;<-comment out="" this="" line="" and="">

    welcome_2.text = enteredText;

  • I need help with script of 'Edit arc' Russell Brown

    Hello

    I installed the script of 'Edit arc' Russell Brown for CS6. It does not play right. I go to the window > Extensions > edit in an ARC and choosing a layer to run the script. I then run the script. the layer converts it to a smart object and opens in the CRA. I treat layer in an ARC and choose 'Open' and then when the layer opens this file is smaller that before I was running the script (i.e. If layer a face of a person on this subject face decreased after treatment of CRA.)

    My Adobe Camera Raw preferences are set to automatically open all the tiffs supported. The file is 300 ppi, 8bits.  My settings of the CRA are 8 bits 300 ppi. I also tried to change the settings of the CRA to 16-bit, 300 dpi. I'm on a mac equipped with the trial version of photoshop CS6. I don't know why the layer shrinks. It seems like ARC treats the file to 240 DPI or something. Can anyone help? Thank you.

    I don't have so I can't test this, but I think that if you change the "Adobe ACR Editor.jsx" script that was installed during the installation of the CS6 Panel, you should be able to match the ppi of the cab to your ppi CS6 documents.

    Modify it, you need to do is to comment out or remove the following lines.

    // change image res to match defalut ACR 240
    if( app.activeDocument.resolution != 240 ) {
        var docRes = app.activeDocument.resolution;
        app.activeDocument.resizeImage(undefined, undefined, 240, ResampleMethod.NONE);
    }
    
  • Help with script UCCX

    Hello again everyone. I'm working on a project that is due today and I'm stuck. My script when it is called desire invites pin code when entered pin is correct, it will be propmt to press 1 for bad weather, etc., to read a message on our call center Quebec and everything works fine. My question is if bad weather is triggered not only play this message iin the than what he does but also place telephone calls to numbers outside and play the greeting of bad weather for them that say to inform our customers that, due to the bad weather, shippments might be delayed. This part does not work. He calls the first number but ends the call immediately. I have attached my op it that will help you. Thank you in advance.

    Quick to play the part of output market successful stage of appeal Place... Change - triggering Contact - the contact that you created in the step to call Place...

  • Need help with script java folder level for silent registration with unique file name

    That's what I'm trying to do

    1. when a person completes the request on one of our computers in the office, there will be a button send at the bottom of the application.

    2 submit the application on is automatically stored on the local server with the file name determined by the fields name and surname on the application.

    example - John Doe Application.pdf

    Saved in the folder C:\Users\Station1\Desktop\FinishedApplication.jpgApplications

    3. This is the example of code I found, but I don't know how to enter which fields determine save name and where to save it to.

    http://thelivecycle.blogspot.de/2015/06/save-with-new-name-in-specified.html

    http://thelivecycle.blogspot.de/2015/06/save-with-new-name-in-specified.html http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.html

    Thank you!

    Lol this is the part that you need as a script to the folder level:

    var lcbSaveAs = app.trustedFunction (function (vDoc, vPath) {}

    app.beginPriv ();

    vDoc.saveAs ({cPath: vPath});

    app.endPriv ();

    });

    This is the code you use in your file:

    lcbSaveAs (, "/ C/users/specialisee1/Desktop/result /" + this.getField("FirstName").valueAsString + "" + this.getField("LastName").valueAsString + "Application.pdf");

    lcbSaveAs is the name of the function of trust.

    vDoc.saveAs is the Document object, call the saveAs method.

    I don't know what oDoc.SaveAs is, or where you got it.

  • Need help with script to remove audit ASM files

    Hello

    It would be great if someone can provide me with a script to delete the files of audit and trace on ASM files

    Thank you

    Aerts.

    Ed,

    I have a shell script which is run via cron once a week.  Of course, you need to change the location of the trace and audit files.  This script will remove all files .trc and .trm more than 10 days

    #! / bin/bash

    find/u01/app/oracle/diag/rdbms /... dbname... / path-name ' * .trc ' - mtime + 10 - type f-exec rm '{} ';

    find/u01/app/oracle/diag/rdbms /... dbname... / path-name ' * .trm ' - mtime + 10 - type f-exec rm '{} ';

  • Need help with script to find the virtual computer by IP

    Looking for a script that will correspond to the vm to IP, but should be able to find several IPS at the same time.

    I put this together from scripts on the net, which works well to search for a single IP address at a time:

    $match_address = Read-Host "enter the IP address to find."

    Get - VM | %{

    $vmips = $_. Guest.IPAddress

    {foreach ($ip in $vmips)

    If ($ip - as $match_address) {}

    "VM found correspondence address: {0}" f $_. Name

    }

    }

    }

    But would need to be able to enter several IP addresses of different subnets in the $match_address and search script for a match for every ip address.

    Could you please try this?

    function search-VMAssociatedToIP {}

    (param

    $ArrayOfIPToCheck

    )

    {in process

    $VMsAndAssociatedIP = get-view - viewtype 'virtualmachine ' | {foreach-object

    $VM = $_

    $_.guest.net | {foreach-object

    $Net = $_

    $_. IpAddress | {foreach-object

    $IpAddress = $_

    $Output = New-Object-Type PSObject-Prop ([ordered] @ {}

    "VM" = $VM. Name

    "NetworkName" = $Net.Network

    "IP address" = $IpAddress

    })

    Return $Output

    }

    }

    }

    $ArrayOfIPToCheck | {foreach-object

    $IPtoCheck = $_

    $VMsAndAssociatedIP | where {$_.} IpAddress - eq $IPtoCheck} | {foreach-object

    $Output = New-Object-Type PSObject-Prop ([ordered] @ {}

    "IpToCheck" = $IPtoCheck

    'VM' = $_. VM

    "NetworkName" = $_.NetworkName

    'IpAddress' = $_. IpAddress

    })

    Return $Output

    }

    }

    }

    }

    $MyArray = "10.0.33.1","10.0.30.11","10.0.20.11","10.0.32.1".

    Search for VMAssociatedToIP - ArrayOfIPToCheck $MyArray | OGV

    Use a table entry.

    First get the IP addresses of all computers installed correctly (only for virtual machines with VMware tools) virtual based on get - view so the collection will be fast.

    Then compare with the PPE provided as input.

Maybe you are looking for

  • Unable to sign in iMessage/facetime

    Hello, I recently changed my email from apple id, and now I am unable to connect to iMessage and FaceTime. Even after the signature to and in all fields, I always get the same result. And I even get a pop up asking to connect, but it still shows the

  • 35 Firefox will on mobile youtube and will not play

    When I try to access youtube.com, it sends me to m.youtube.com (mobile version). The url is changed by using bookmark or manual entry of the url. When I click on 'watch video', I get a dialog box 'Launch the Application', which wants to use Real Play

  • iTunes does not connect with any of my devices 1-itouch 2-iphones

    I have connected my itouch to my computer (usb) and itunes does not just I tried of recognized her. I tried to connect my both iphones and the same result - nothing. I tried all usb ports - nothing. What is going on??  I have the latest version of it

  • Satellite M70 - pilot archives on the Toshiba site to THE corrupt

    Hi all I do a new install of XP on a Satellite M70. This page lists all the necessary drivers: http://www.MyToshiba.com.au/support/notebooks/satellite/M70/psm70a-01700e/download?OS=22 Unfortunately, each zip file I download from that link is corrupt,

  • I can trnafer my favorites from IE to Firefox?

    I have Favorites in the toolbar. I have Firefox Bookmarks. Is there a way to transfer my IE Favorites to bookmarks on Firefox?