Remove all instances of a link

Hello

I have many instances of a link across a number of pages and I want to remove all of them without having to go to each page, select all and delete. I thought that there is a way using the links palette, such as right click on group link and "remove all" but it doesn't seem to be.

The links is not a specific object applied style so I can't (I think) use the search/replace.

Is there another way to get around this?

Thanks in advance.

(CS4 6.0.5)

I made a simple script that does this - select an image with the selection tool (black arrow) and run the script - it should remove all instances of the binding. I guess you want to remove the images, leaving the frames containing the intact.

Caveat! Just in case, save the file before running the script to be able to come back if something goes wrong.

Kasyan

if (app.documents.length == 0) ErrorExit("No documents are open. Please open a document and try again.", true);
var doc = app.activeDocument;
var links = doc.links;
if (app.selection.length != 1) ErrorExit("Select a graphic frame with image", true);
var sel = app.selection[0];
if (sel.images.length != 1) ErrorExit("Selected graphic should contain an image image", true);
var selectedLink = sel.images[0].itemLink;
var selectedLinkPath = selectedLink.filePath + "";
if (selectedLink == null) ErrorExit("Selected item doesn't contain a link", true);
var allInstances = [];

for (var j = 0; j < links.length; j++) {
     if (links[j].filePath == selectedLink.filePath) {
          allInstances.push(links[j]);
     }
}

for (var i = allInstances.length-1; i >= 0; i--) {
     try {
          var link = allInstances[i];
          var image = link.parent;
          image.remove();
     }
     catch(err) {
          $.writeln(i + " - " + err);
     }
}

function ErrorExit(myMessage, myIcon) {
     alert(myMessage, "Error", myIcon);
     exit();
}

Tags: InDesign

Similar Questions

  • Remove all instances of a subform by a radio button option

    I have a radio button with Yes/No options.  If the user selects 'Yes', a group of questions and a button are rendered visible.  If the user wants to add another group of questions they must click on the button that has been done just visible.  The other group of issues is in a subform that again if the user clicks the button. If the user changes their mind 'Yes' to 'No', I need to have subforms that have been added deleted. How all instances of repeat the subform can be removed by selecting the option "?

    Yes radio button script:

    If (this.rawValue == 1) {}

    subform.presence = "visible";

    }

    The button script:

    _subform2.addInstance (1);

    Thank you!

    You can control the number of instances with the setInstances() method.

      // Remove all instances of subform2
    _subform2.setInstances(0);
    
  • Script to search for text and remove the hyperlink and characterstyle link which applies (back to normal)

    I need help with my script to search for text and remove the hyperlink and characterstyle link which applies (returns the normal text).

    I can't do either as I want.  I want the user to be able to type in a dialog text they want to search for, do search this text IGNORING case (case insensitive) and then for all instances that he find it, remove character styles that are applied to the (set to [none]) and delete the hyperlinks.

    My code seems to define the character style [None], when I click on the text and look at the window of character Styles, BUT all old styles (font color, underline) are always applied and removed not as I want.

    Also, I can't understand how to remove all of the old links.

    Here is my code:

    myDocument var = app.activeDocument;

    var noneStyle = myDocument.characterStyles.item ("[None]");

    var myFindVal = "";

    var myErrorText = "";

    var myErrorCount = 0;

    myDialog = app.dialogs.add var ({name: "search user submitted text and delete hyperlinks from objects found.", canCancel: true});

    {with (MyDialog)}

    {with (dialogColumns.Add ())}

    {with (borderPanels.Add ())}

    staticTexts.add ({staticLabel: "search and delete hyperlinks for :"}); "})

    myTextBox var = textEditboxes.add({minWidth:100});)

    }

    }

    }

    If (myDialog.show () == true) {}

    myFindVal = myTextBox.editContents;

    doSearchAndReplace();

    app.findTextPreferences = NothingEnum.nothing;

    app.changeTextPreferences = NothingEnum.nothing;

    If (myErrorCount == 0) {}

    Alert ("done! ("Part of the links have been removed for: '" + myFindVal + ""! "");

    }

    else {}

    Alert ("last error: '" + myErrorText + "' & number of errors:" + myErrorCount);

    }

    }

    myDialog.destroy ();

    function doSearchAndReplace() {}

    app.findTextPreferences.findWhat = myFindVal;

    app.findChangeTextOptions.caseSensitive = false;

    app.findChangeTextOptions.includeFootnotes = false;

    app.findChangeTextOptions.includeHiddenLayers = false;

    app.findChangeTextOptions.includeLockedLayersForFind = false;

    app.findChangeTextOptions.includeLockedStoriesForFind = false;

    app.findChangeTextOptions.includeMasterPages = false;

    app.findChangeTextOptions.wholeWord = false;

    var myFoundItems = myDocument.findText ();

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

    myRemoveHyperlinkAndStyle (myFoundItems [i]);

    }

    }

    function myRemoveHyperlinkAndStyle (myFoundItem) {}

    try {}

    myDocument.hyperlinkTextDestinations.item (myFoundItem) .remove ();

    myDocument.hyperlinkTextSources.item (myFoundItem) .remove ();

    myDocument.hyperlinkURLDestinations.item (myFoundItem) .remove ();

    myFoundItem.applyCharacterStyle (noneStyle);

    }

    {catch (MyError)}

    myErrorCount ++;

    myErrorText = MonErreur;

    }

    }

    Hello

    Right, some hyperlink might be a pageItem...

    expand the 'if' condition with:

    If (myHyp [len].source.hasOwnProperty ("sourceText") &... content ==...)

    Jarek

  • Try to remove duplicates, "show exact duplicates" check all instances of some songs

    I'm trying to remove the duplicates in my iTunes (in thousands) library. I view "replica", but for some songs, it checks all instances of the same song, so I can't delete checked without losing these songs in total. Is there a way to fix this, or what I have to go through the entire library of the song?

    Using the latest version of iTunes on a windows PC.  I read the instructions for the removal of duplicates, but my situation is not covered.

    Thank you

    If an entry in a list of audit checks another which makes me suspect that you watch a playlist in which the same elements have been added more than once, rather than the main list of music. The boxes are global in iTunes. One of the phases in my deduper script mentioned below clearly these duplicates of playlist, however, in its current form you need to run it on every playlist where you have this problem if only would you fix this type of problem. For the cleaning of the library to start with the source music in the view of songs and use exact replica. The current version requires counties to disk and the number of titles to match who I'm not sure was always necessary. If you don't see any duplicates that you would expect that maybe why.

    Official notice of Apple on the duplicates is here: find and remove duplicates in your iTunes library. This is a manual process and article fails to explain some of the potential pitfalls such as the lost coast and membership of playlist, or sometimes the same file can be represented by multiple entries in the library as well as a removal and recycling the file will break all the others.

    Use MAJ > view > show items to reproduce exactly to display the duplicates because it is normally a selection more useful. You must manually select all but one of each group to remove. Sort the list by Date added can make easier select appropriate tracks, but it works better when executed immediately after the dupes were created.  If you have several entries in iTunes connected to a same file on the disk hard then don't not send to trash.

    Use my DeDuper script (Windows only) If you are not sure, do not want to do it by hand, or want to maintain ratings, play counts and playlist membership. See this background thread , this post for detailed instructions and Please take note of the warning to back up your library before deduping.

    (If you don't see the menu bar press ALT to temporarily view or CTRL + B to keep displayed.)

    The latest version of the script can put away the dead links as long as there is at least a double live to merge his stats and membership of the playlist and must deal wisely when the same file has been added through multiple paths.

    TT2

  • To remove all listeners and/or all links?

    Hello

    Is it possible in JavaFX 8 to remove all listeners change/cancellation on an observable?

    And is it possible to remove all the links on a property?

    Thank you

    Graham

    Is it possible in JavaFX 8 to remove all listeners change/cancellation on an observable?

    When parameterListener is passed to removeListener(), implementation goes through the list of all the listeners of change/cancellation. He calls parameterListener.equals on each of the listeners in the list and remove the first of so that it returns true. Therefore, the answer is technically Yes. However, you can't directly access the list of the headphones and it is not recommended that you remove any listener that you have added yourself.

    And is it possible to remove all the links on a property?

    If you know everything that was related to it. But I don't think that you have access to the internal list of all things related.

  • Remove all the missing links with frames

    How can I make a script to remove all the missing links with frames in indesign?

    var doc = app.activeDocument;
    Links var = doc.links;

    for (var i = links.length - 1; i > = 0; i--) {}
    If (links [i] .status == LinkStatus.LINK_MISSING) {}
    try {}
    Links [i] .parent. Remove();
    var image = link.parent;
    var frame = image.parent;
    Frame.Remove ();
    counter ++;

    }
    {} catch (err)
    $.writeln (i + "-" + err);
    }
    }
    }

    I have try this script, but still remain a framework, what is wrong with that?

    It works for me:

    var link, image, frame,
    doc = app.activeDocument,
    links = doc.links,
    counter = 0;
    
    for (var i = links.length-1; i >= 0; i--) {
        if (links[i].status == LinkStatus.LINK_MISSING) {
            try {
                link = links[i];
                image = link.parent;
                frame = image.parent;
                frame.remove();
                counter++;
            }
            catch (err) {
                $.writeln(i + " - " + err);
            }
        }
    }
    
  • How to remove all the scripts on the instances of the object?

    I'm looking for one any solution here, not to mention disabling the setting warn.

    I hate it when I am converting someone to another project AS2 AS3 and buried on an instance on stage somewhere, that gives me the warning code:


    "The actions on the button or MovieClip instances are not supported in ActionScript 3.0." All the scripts on the instances of the object will be ignored. »

    How can i:
    Has) find what instances have code on them.
    or

    B) delete all of the code on all instances.

    Idea:
    Can I save as a different format/version/something and lose data in some way. Then I could convert back the current format of the FLA?

    use the movie in flash Explorer to search for actionscript.  whatever it is attached to an object must be removed.

  • Can I remove all the links in a doc at a time?

    Servers us point were overwhelmed, so we always want to load pages, but for now, we want to remove all the links that point to these servers. However, we always want the text associated with the link to appear. In other words:

    Copy the following code:

    "< a href =" http://www.hollandamerica.com/dest/port.do?portCode=NPT & amp; dest = N "> Newport, Rhode Island < /a >"

    Will equal now to copy the following code:

    Newport, Rhode Island

    Is there a way to disable links or do a search/replace where it exits the tags, but not the text?

    I'm puzzled and I appreciate all help.

    Jon

    I never knew what were the "Regular Expressions". It will be exciting!

  • I want to remove all filters and start over. What file/folder I need to delete?

    The filters do not work properly and I've reconfigured several individual filters to try to make them work. I'm ready to restart from scratch, but do not want to remove 40-50 filters individually if there is a folder that I can easily access and delete.

    you have not clearly localized all instances of msgFilterRules.dat.

  • How-to Remove All Data Web site

    I had a fake Virus alert and got rid of the lock upwards, but have been unable to "Remove all data from the Web site" in the preferences "Privacy". Whenever I have delete data, it is well again with 206 stored cookies. Any suggestions to get rid of these cookies permanently?

    Safari automatically checks websites for updates:

    Top Sites

    Son subscribers

    Sites selected for Quick Web site search

    Pages that turn up as Top Search Hits

    Pinned tabs

    Cookies and data bases of these sites will be reloaded even if you do not visit them. If there are sites that you do not want to accept cookies, follow the instructions in the support articles linked above to exclude. Note that if you visit a page often, it may be added to your Top Sites unless all the available places are already occupied by pinned sites.

    Cookies can also be created by elements, such as advertisements and invisible "web bugs", which come from a different web server than inviting you to. You can block some of these cookies in the privacy of the Safari preferences window tab.

    To block all cookies for a site on a selective basis, you will need to use third party software or another browser. I don't have a specific recommendation.

    The file in which web cookies are stored can also be used by third-party applications that use the same mechanism as Safari to communicate with web servers. These applications can add cookies from sites you have never visited in Safari.

  • Remove all documents (3430) iBooks 4.6 &amp; data

    How can I remove all documents and data in iBooks 4.6 (3430)?

    Settings > General > storage & use iCloud > storage: storage management > iBooks shows that 1.4 GB of Documents & data are consumed. My goal is to reduce that less than 100 MB.

    In iBooks, I have selected the two elements in all the books and have exploited the button Delete. The elements now exist with a download of cloud icon

    I also went in iBooks on OS X and hid all foreign purchased iBooks.

    Settings > iBooks has the following settings by default:

    Synchronize bookmarks and Notes: off

    Synchronize Collections: off

    Online content: off

    Settings > iTunes & App Store has books DOWNLOADS AUTOMATIC start.

    I restarted my iPod and iBooks is always consumed 1.4 GB.

    iBooks is now consumed 2.0 GB of storage.

    Apparently he uploaded a certain number of books previously purchased without my permission. Opening iBooks still once, I found a number of books in my collection that I had previously deleted. I chose the books, then selected delete. These books are now gone because I have also chosen to hide these books by using iBooks on OS X in my account settings, but a number of books and collections still appear in my collection of iBooks. By selecting do not have the provision to remove. They are either collections, books that exist in the cloud (with a download icon collection iCloud), or links to an iBooks record entry for the book missing.

    After doing this, iBooks is always consumed 2.0 GB of storage.

    I just want to remove this from my iPod touch, including the alias vestigial book, collections and pointers to iBooks store pages. I would remove the unit iBooks app altogether if I could.

  • Remove all the patches and windows updates

    Hello

    How can I remove all the patches by using the Recovery Console - command prompt environment. Is it possible to remove all the patches. Where are all the patches and updates KB is stored in the Windows VISTA Business operating system. Help, please

    Thank you
    Concerning
    Anoop

    Hi Anoop,

    Thank you for writing to Microsoft Vista Community Forums.

    You can uninstall patches to a command using msiexec.exe and command line Options.

    For more information about the removal of patches of command prompt, access the link below: http://msdn.microsoft.com/en-us/library/aa372104 (VS.85) .aspx

    It will be useful.

    Thank you and best regards,

    Srinivas

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think

  • All my files turned .link files and I can't download anything including .zip it's impossible to read .exe files

    I have no internet connection on the laptop (windows xp) after I got this virus any. All my files turned .link files and I can't even open the help and support. When I open the Control Panel, it opens but the icons will lead me not to anywhere. I tried to type in the "Run" dialog box, but it will load and then stop, leading me to nowhere. Evrything is transformed into files .link except internet Explorer, my computer, my documents, the trash and another that I forgot, but even if I open internet, it is useless, since I lost the internet connection. I can't open anything to restore my internet connection. I tried restoring the system also, but it's been so long that it would not return to where it was fine. Also I tried to restore to when it was still very well, but it does nothing. I even tried the safe mode and it is still the same. I tried to format the Local drive, but it tells me to close something that may have been watch the computer or soemthing like that. I formatted the back towards the top but not the local drive. I found the windows xp CD but when the window opens to reinstall, and then when I click on reinstalling windows xp, it won't be going anywhere. The other links will lead to a place, but reinstalling windows won't open. I tried to use the system startup and you press on enter when he went to the Conference of the disarmament/something something and it still does nothing. It will say like taking files from CD or something, but it leads to nothing. I really want to just my laptop to remove everything so I can reinstall windows.

    See if this allows you to format and reinstall XP...
    http://www.YouTube.com/watch?v=Wf2Ffm33DhA

  • Windows Update 0x800A0046 error code. Have tried all the solutions proposed in all instances, including running MS Fix It. Nothing works.

    Have tried all the solutions proposed in all instances, including running MS Fix It.  Nothing works.

    Did you use this guide:

  • Software PlayItAll removes all file associations

    I used to add it and remove software control panel to remove this software.  Once it is removed the whole system is unusable.  It's as if each file is lost he asks which is related to.  Is any way to remove this software from my system with corrupt them all of the computer?

    As much as to remove it if you don't have a restore point practice to go back, you can try to remove the sub program directory "Program Files", then use regedit and search for "playitall", then delete all instances that appears.

Maybe you are looking for