The source of text of hyperlink destination

If you go to a destination of the hyperlink text and look in the editor mode, you should be able to see a small symbol that resembles a rounded corner square with a circle and cross inside. I guess that's an invisible text element that is used to bind to the source.

I want to be able to do is to select one of these items and using JavaScript to select the source element... However, I am having a hard time getting the script to recognize this element as anything... Not to mention about his relationship with a source.

I hope it's quite explanatory.

Hi all

Back from my break.

I found the problem 2.

(1) how to get the hyperlink sources since the destinations, i.e. you can so make reverse it as Pickory suggested.

(2) how to find the symbol of Destination which can be seen on the editor mode, but is not a symbol of hidden character.

This can be done with indesign GREPs as there is no symbol on the main screan (Peter correct me if I'm wrong), but can be found with a regex in javascript

reg = /\ufeff/g;
q = mySelection.contents.search (reg);

All this does is find the symbol, but that is just a symbol that contains no information, know where it is associated with to compare the point insertion and history co-ordinated the symbol with the values in destinations.

Of the to do quickly, I make a table (see text)

There is a problem with that what the values or static is ok for creating an index or something like that, but if we replace the main text story / the symbol insertion point will change and the script won't find the destination with the symbol.  I this is a problem take advantage of re-writing of scripts there.

Kind regards

Trevor.

P. s.

MAKE SURE THAT THE JAVASCRIPT CONSOLE IS OPEN OR THAT YOU WILL NOT SEE THE SCRIPT TO DO ANYTHING!

// Hyperlink Destination Source Script byTrevor http://forums.adobe.com/message/4721797#4721797
// MAKE SURE THAT THE JAVASCRIPT CONSOLE IS OPEN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// SCROLL  UP THE CONSOLE UNTIL YOU SEE (:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)

var myDoc = app.documents[0],
myDestinations = myDoc.hyperlinkTextDestinations.everyItem().getElements(),
mySources = myDoc.hyperlinkTextSources.everyItem().getElements(),
myHyperLinks = myDoc.hyperlinks.everyItem().getElements(),
dl = dll = myDestinations.length,
hl = hll = myHyperLinks.length,
myDestinationsSearchTable = [],
myHypers = {}, hyps = [], dests = [], n,
mySelection = app.selection[0];

// Make an index of destionation sources from the hyperlinks that contain both sources and destinations
// This will miss any Destinations that don't have sources
$.writeln ("\r\r(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)\r(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)(:-)\r\rHyperlinks Sources from Destinations Script\r\rThese are my look up keys")
while (hll--)
    {
        if (myHyperLinks[hll].destination != null)
        {
            if (hyps[myHyperLinks[hll].destination.index] == null)
            {
                hyps[myHyperLinks[hll].destination.index] = {};
                hyps[myHyperLinks[hll].destination.index]["Destination"] = myHyperLinks[hll].destination;
                hyps[myHyperLinks[hll].destination.index]["Sources"] = [];
             }
            hyps[myHyperLinks[hll].destination.index]["Sources"].push(myHyperLinks[hll].source);
        }
     }

// make an array of all destinations with what every properties you want to extract i.e. name location sources page number etc.
// add or remove as prperties as needed "DestinationID" is used here for the search look up table
while (dl--)
    {
        dests[dl] = {};
        destIndex = myDestinations[dl].index;
        dests[dl]["DestinationID"] = myDestinations[dl].destinationText.parentStory.index+"x"+myDestinations[dl].destinationText.insertionPoints.lastItem ().index;
        myDestinationsSearchTable[dests[dl]["DestinationID"]]=dl; // makes a look up table to use for search
        $.writeln("myDestinationsSearchTable ["+dests[dl]["DestinationID"]+"] = "+dl);
        if (hyps[dl] != null)
        {
            dests[dl]["HasSource"] = 1;
            dests[dl]["DestinationName"] = hyps[destIndex]["Destination"].name;
            dests[dl]["DestinationIndex"] = destIndex;
            dests[dl]["DestinationInsertionPoint"] = hyps[destIndex]["Destination"].destinationText.insertionPoints;
            dests[dl]["DestinationCharater"] = hyps[destIndex]["Destination"].destinationText.insertionPoints.lastItem ().index;

            dests[dl]["DestinationStory"] = hyps[destIndex]["Destination"].destinationText.parentStory.index;
            dests[dl]["DestinationCharaterCode"] = myDoc.stories[dests[dl]["DestinationStory"]].characters[dests[dl]["DestinationCharater"]].contents.charCodeAt(0).toString(16);
            dests[dl]["DestinationPage"] = (hyps[destIndex]["Destination"].destinationText.parentTextFrames[0].parentPage != null) ?  hyps[destIndex]["Destination"].destinationText.parentTextFrames[0].parentPage.name : "Off the Page";;
            dests[dl]["SourceNames"] = [];
            dests[dl]["SourceIndexs"] = [];
            dests[dl]["SourcePages"] = [];
            l = hyps[destIndex]["Sources"].length;
            dests[dl]["Destination"] = hyps[destIndex];

            while (l--)
                {
                    dests[dl]["SourceNames"].push(hyps[destIndex]["Sources"][l].sourceText.contents);
                    dests[dl]["SourceIndexs"].push(hyps[destIndex]["Sources"][l].index);
                    (hyps[destIndex]["Sources"][l].sourceText.parentTextFrames[0].parentPage != null) ?
                    dests[dl]["SourcePages"].push(hyps[destIndex]["Sources"][l].sourceText.parentTextFrames[0].parentPage.name) :
                    dests[dl]["SourcePages"].push("Off the page");
                  } 

        }
       else dests[dl]["HasSource"] = 0;
     }
 // if there's text selected search for destination anchors
if ( app.documents.length && app.selection.length && mySelection.hasOwnProperty ( 'baseline' ) && mySelection.constructor.name != "InsertionPoint")
    {
        var mySelectionDestinations = [],
        // this is the unicode for the destination symbol
        q=0,
        indexAdjust = mySelection.parentStory.texts.itemByRange (mySelection.parentStory.characters[0], mySelection.characters[0]).characters.length-1,
        myStory=mySelection.parentStory.index,
        reg = /\ufeff/g;
        $.writeln("*********** Destinations in Selection **********")
        while (q != -1)
            {
                q = mySelection.contents.search (reg)
                if (q != -1) // when used in practise remove the if condition and pop array after loop
                    {
                        mySelectionDestinations.push(dests[myDestinationsSearchTable[myStory+"x"+(q+indexAdjust)]]);
                        $.writeln("mySelectionDestinations ["+(mySelectionDestinations.length-1)+"] = myDestinationsSearchTable ["+[myStory+"x"+(q+indexAdjust)]+"] = "+myDestinationsSearchTable[myStory+"x"+(q+indexAdjust)])
                    }
            }
        $.writeln ("################\rThese are these are the destinations in the selection: "+mySelectionDestinations+"\r")
        for (n in mySelectionDestinations) $.writeln (mySelectionDestinations.toSource()+"\r###########\r\r")
    }

$.writeln ("%%%%%%%%%%%%%%\rThese are all the document's hyperlinks that have destination\r");
for (n in hyps) $.writeln (n+"\t"+hyps[n].toSource()+"\r--------------------------");
$.writeln("++++++++++++++++++++++++++++++++++++\r\r"+
    "These are all the document's hyperlink destinations with source and other properties\r");
for (n in dests) $.writeln (n+"\t"+dests[n].toSource()+"\r**********************");

Tags: InDesign

Similar Questions

  • Interactive adjustment of the Source of report/form.

    I have an interactive report that connects to a form that allows you to edit the data in the report row that was clicked. On this form, I know for non-PK columns, you must choose a source of "column.
    But what the source for text elements hold the primary key columns?
    I noticed this setting those either "Always, replacing all existing..."/ "Always Null" or "Database column" work. " Since the form never will allow the user to change the PK columns, it must be set to "column of the database" because its value does not update the column in the related table.
    What is the standard practice to set the Source in this situation?

    Hi Prohan,

    PK columns always are the columns of database and, in fact, are probably more important because these are the ones that the page process to recover and insert/update / delete data. If you check the process "go get the line from...". «and "line process of...» "on a form page, you will see the PK elements used.

    Generally, they should be implemented exactly the same with regard to the other columns in the database, but must be 'hidden' so that the user cannot change them.

    Andy

  • Table of contents imported as the overlay of text have no active hyperlinks in PDF format

    Hello

    The model that I inherited uses a method in which the table of contents appear in the main FM as an insert text imported doc. To create the table of contents, a table of contents in autonomous is created and then imported as a text box to the specific location in the main file. When this FM file is saved as PDF hyperlinks in the page table of contents do not work.

    -Am I doing something wrong, or is - what a limitation of text import crashing like OCD?

    Thank you

    Donna

    For reasons specific to my application, I use books with a Table of contents file that imports the TOC file generated as a text overlay. And hyperlinks in the PDF file. I understand that, in general, the links in text ads that link outside of themselves are not active in the PDF file. But for some unknown reason, the links in my Table of contents work in the PDF file.

    So, I tested your case. I created a standalone table of contents for a single document (be sure to select create hyperlinks in the Set Up Table of contents dialog box) and then it imported by reference into the document. I created the PDF (print to the Adobe PDF printer) and the links work perfectly.

    Make sure that you have selected data Acrobat generated in the print dialog box, and THEN select make named Destinations in the links in the PDF Setup dialog box tab.

    I have also heard that if you apply a format of characters in a line in the table of contents, links will not work in the PDF file. It is another thing to check.

    Van

  • Not find search text in the source code files

    If I rename a .vb in .txt or .sql file, I CAN find the text in the file by using a not indexed search, but if I do not rename the file, simple text search CAN NOT find in the file as a "create table" or "function".  This behavior is pretty useless for a developer.  Is there a way to do this type of research, or any kind of utility "Find Classic" that works like Find in XP?  Thank you.

    Here's a FAQ on the incidence of indexation and research: http://windows.microsoft.com/en-us/windows-vista/Improve-Windows-searches-using-the-index-frequently-asked-questions.  You should read the article in full - it is instructive on how research occur in Vista which is very different from how they were in XP.  It includes how to add files and locations to the index.

    To search for the folder C: whole disk in Vista go to start / search and type in ' or '. As you type, you'll see two hyperlinks appear just above where you type and we'll search everywhere.  A click on it.  Who will do a fast indexed search and bring up a dialog box.  Click on advanced search.  Click the drop-down location and find the C: drive and click on it. Check the box "include not indexed, hidden and system files (might be slow).»  Then click on search.  You will now search your entire hard drive to the specified file.  And Yes, this isn't a very effective way to search the entire disk for a file but it is how it is done in Vista.

    Here are some tips on how to find files (and the page includes a number of hyperlinks to related articles while doing the research you can also consult: http://windows.microsoft.com/en-us/windows-vista/Tips-for-finding-files.)  There are also a lot of links to other articles on the research of Vista - but not as good as this.

    I did a search for a character in my book, and each project book came to research (well most of them - all fit in the list without go advanced).  This is because the files .doc, .docx, and Documents are all included in the Index.  I think that if you add .sql and .vb and the location of your files, you'll be able to search by content as well.

    I hope this helps.  Good luck!

    Lorien - a - MCSE/MCSA/network + / A +.

  • I have copy and paste files and folders, but the size of the destination memory is high compared to the memory of the source

    I copy and paste some files and folders in windows server 2003 for my external USB HDD, but the size of the destination memory is high compared to the source of the memory size

    Hello

    The question you posted would be better suited in the TechNet Forums; We recommend that you post your question in the TechNet Forums to get help:

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

  • value of the cursor relative to the source text

    I'm trying to parent a host of kerning on a slider on SliderControl, which is related to the source text on TrackingControlof the text .

    The real problem here is parenting to the value of the cursor in the Source text. I tried this expression on the cursor, without success:

    txt = comp("thisComp").layer ("TrackingControl") .text .sourceText;

    If (! isNaN (parseFloat (txt)))

    parseFloat (txt)

    on the other

    value

    The expression gives me any errors, but it seems also connect to anything!

    Reason:

    I build titles for first models, which allow only the source text to be edited. So, to control kerning inside the comp from the AE model, I need parents host kerning to a text layer, which can be edited directly from the effects of first Panel.

    Solved my problem, LOL.

    Just had to remove the first line and re selection icon to get the correct syntax 'thisComp '.

    txt = thisComp.layer("tracking").text.sourceText;

    If (! isNaN (parseFloat (txt)))

    parseFloat (txt)

    on the other

    value

  • Hi, I seem to do the right thing to try to use kidnapping Spot to remove a few shadows around a photo portrait. But once I have select the Destination, then the Source by dragging the circles that nothing seems to happen. How to apply the Source?

    Use Clone. Opacity = 100%.

    THX

    Rishi

    Make sure you have selected "Clone" with opacity

    Click place tool once to the region of "Destination".

    Move the other circle on the 'Source' box (the key "/" automatically selects the other areas)

    Click on 'done '.

    You are doing a difficult job for Lightroom! This type of editing is best done in Photoshop.

  • Tools patch problems, do not have the option on my screen to choose the source or destination

    my content aware patch tool has stopped working.  I don't have the option on my screen to choose the source or destination.  I know I did something to her but I don't know what.  any ideas how I can make it work again?  Thank you.

    Hi rojas66,

    Greetings.

    • Make sure you have selected "normal."

    • If this does not work, let us know what changes made since the last time it worked.

    Concerning

    Rohit

  • Cloning a virtual machine running Live - destination of the is an exact match to the source at the beginning or end of the cloning process?

    Hello

    I'm not a VMware Expert, so please forgive my noob question.

    I was invited to migrate files from Windows Server 2003 to 2012 servers, and I intend to use cloning as a way of copying the VMDK with data from the file to the new server of 2012.

    I created a script with vSphere PowerCli, which made a clone of the source and, once the cloning is complete, it stops and disables the Server service on the Windows of the source virtual machine operating system to avoid changes in the source of this point in time.

    But I noticed, I have start by making a snapshot.

    Question:

    Changes made to the source VM when creating the clone will then be synchronized at the end of the cloning process, so that the destination virtual machine will be an exact copy of the source, at the end of the cloning process?

    Or destination VM will correspond only to the source of the VM at the time of the opening of the cloning process, and all the files that have been updated on the source VM when creating the clone will be lost on the destination?

    Thank you for helping me to get a clear understanding of the present!

    Best regards

    Changes made to the source VM when creating the clone will then be synchronized at the end of the cloning process, so that the destination virtual machine will be an exact copy of the source, at the end of the cloning process?

    Laughing out loud

    Or destination VM will correspond only to the source of the VM at the time of the opening of the cloning process, and all the files that have been updated on the source VM when creating the clone will be lost on the destination?

    Yes, the destination will be the data from the time you start to create the clone, because a snapshot will be created on the beginning of the process and the basic of this hat of the VM disk will be copied, all changes made on the source VM will be writing about the delta file and these data will not be copied.

  • the source at the time text value

    Hey,.

    I'm a newbie to AE script. I would like to change the color of the text over time. I already did with the properties of scale f.e.. I would like to do the same thing with the color. So until this Ive changed the color once:

    CHANGING THE PROPERTIES OF TEXT SOURCE {{{}}

    var compSourceText = comp.layer (1) .property ("Source Text");

    var compTextValue = compSourceText.value;

    compTextValue.fillColor = [1, 0, 0];

    compSourceText.setValue (compTextValue);

    // }}}

    How can I change it to given time? Like here:

    var compScaleProperty = comp.layer (1) .property ("Scale");

    compScaleProperty.setValueAtTime (5, [360, 360]);

    compScaleProperty.setValueAtTime (5.4 [370, 370]);

    compScaleProperty.setValueAtTime (5.8, [380, 380]);

    compScaleProperty.setValueAtTime (6.2, [400, 400]);

    compScaleProperty.setValueAtTime (6.6, [420, 420]);

    compScaleProperty.setValueAtTime (7, [440, 440]);

    I would be very grateful for any help

    I think that you do much the same way:

    var compSourceText = comp.layer (1) .property ("Source Text");

    var compTextValue = compSourceText.value;

    compTextValue.fillColor = [1, 0, 0];

    compSourceText.setValueAtTime(0,compTextValue);

    compTextValue.fillColor = [0, 1, 0];

    compSourceText.setValueAtTime(1,compTextValue);

    etc.

    Dan

  • Shrink a VM HD - is the destination data store need to have enough space for the source or destination VM?

    Hi all

    I have an existing file with HD Server configures:

    HD1: 60 GB

    HD2: 20 GB

    HD3: 650 GB

    Total: 730 GB

    I intend to shrink HD3 250 GB that will give me a new total of 330 GB.

    My question is, when I rode the VMware Converter Standalone process and I get to the step where I select the 'destination '.  Obviously, I need to select a data store that can adapt to the virtual destination machine.

    My concern is that it shows the size of the source disk (Go 730) (see image below), and for some reason any part of the conversion process the destination data store requires the storage of the size of 330 GB vm 730GB as opposed to the 'new '.

    source disk size.PNG

    Can anyone confirm?

    Thank you

    There are no for the data store 730 GB free in order to submit the conversion. 330 GB free (size after reduction) would be sufficient.

    If you also select a provisioning, you could even start the conversion with less free space on the data store, but it may fail at some point, if the actual data meet.

  • Appearance of the cursor for the source text

    Hello

    I would use a cursor to display text (when the value of the slider is 0, the source text will display any results, when it's 10, the source text display the first 10 letters etc...). Like the typewriter animation effect (but I need with an expression of the Source text)

    I have created a slider named "TextSlicer".

    Wrote a text layer

    And this expression in the Source text:

    Try

    {

    text.sourceText.split("") [Math.round (effect ("TextSlicer") ("Slider"))]

    }

    catch (Err)

    {text.sourceText}

    With this expression, I post a letter in time.

    My goal would be to show the letters N, based on the value of the slider:

    text.sourceText.split("") [0] + text.sourceText.split("") [1] + text.sourceText.split("") [2], text.sourceText.split("") [n]...

    Thank you!

    fullText = 'blah blah ';

    numLetters = Math.floor (("TextSlicer")("Slider").value) effect.

    fullText.substr(0,numLetters);

    You can also leave the text constant and add host text > opacity.

    Xavier.

  • Change the source file of the insert text with a script

    I'm looking for a way to replace existing-insert text in a document with the contents of another file (by reference), using scripts. I have a document c:\referer.fm, in which there is an insert text which the source file is: c:\A.fm

    I also have c:\B.fm, and now I want to change referer.fm so that is no longer the overlay of text contains the text of A.fm, but the B.fm.

    I tried this:

    var doc is app. ActiveDoc;

    var textinset is doc. FirstTiInDoc;

    var pathtosource is textinset. TiFile;

    pathtosource = "c:\B.fm";

    textinset. UpdateTextInset();

    But it does not work. I guess that the "pathtosource" parameter can be done this way. If someone knows a way to do it, I would greatly appreciate your help!

    David

    Hello David,.

    You do not manipulate the text overlay, but a copy of the file in the text box. Your "pathtosource" parameter is a local copy of the property that you read from the actual text insert.

    Try this code instead:

    var doc is app. ActiveDoc;

    var textinset is doc. FirstTiInDoc;

    textinset. TiFile "c:\\B.fm".

    Note that the backslash must be escaped with the backslash to make it work in a JavaScript string. To make your script Fail-Safe, test the name of file textinset before changing. You do not have the textinset that you expect to have, as might also be INSET text on master pages and reference. All inserts text are in a single linked list.

    Also, update the text tagging along after that changing the path may not always work, as compared to FM, last changed the file date text inset with the last time that the textinset has been updated. To force the FM to update the textinset, you must include the following line of code after changing the filename text inset:

    textinset. LastUpdate = 0;

    Then, you can call the UpdateTextInset() method and it will work.

    Good luck.

    Jang

  • How can I change the default blue text and underline when I create a hyperlink?

    How can I change the default blue text and underline when I create a hyperlink?

    Click on the links hyperlink to change Styles of bindings; or Site properties, and then click text.

    Slash screen opens. If you want to create a new style there is an icon small page in the bottom right of the window next to a trash box. This icon pulls a new style of link, and you can edit each of the four States. Simple, when you find this "cute little page icon" who thought something silly would be obvious for everyone...

  • Change the color of text for the hyperlink in the Blog module

    How to change the color of text for the hyperlink in the Blog module?  I tried to add the code:

    text-decoration: none;

    in the HTML code, but maybe I only am not inserted correctly.

    Any ideas?

    Thank you!

    Hi Casey,.

    Make sure also that you have nothing referring to the color attribute in your CSS.  For example on my test site screen.css control it is here an example of using Firebug to find this.

    If still stuck and specify the site and help further.

    Kind regards

    -Sidney

Maybe you are looking for

  • Should I upgrade my macbook mid 2012 lion 10.7.5 pro to El capitan?

    Some things have worked odd how wifi does not immediately connect and safari in place, and El capitan appears to be sound got some interesting features and is relatively stable, so I think the upgrade. However, I wonder if my material from mid-2012 (

  • CP1025nw: Cannot install my printer on Yosmite

    Hi guys,. Only, I formatted my Mac and re-installed the Yosmite. However when I went through the hp site and try to download the reader, there's nothing downloadable for the current drive. Also it turns out that the driver I have with my printer told

  • Cisco ASA VPN Site to Site WITH NAT inside

    Hello! I have 2 ASA 5505 related to IPSEC Tunnel VPN Site to Site. A 192.168.1.0/24 'remotely' inside the network and a local "192.168.200.0/24' inside the network (you can see the diagram) The local host have 192.168.200.254 as default gateway. I ca

  • does not recognize my subscription to plan photography

    Hello. I have a problem. I'm subscribed to the plan of photography. When I download the Ps and Lr can do just to try it for 30 days. As if it was not signed. I just downloaded the Ps and Br. Lr Br downloaded correctly. I appreciate a lot of informati

  • Conditional 'function' to play the timeline

    Hi all:I can't something, that I thought would be easier. I have done this in AS / Flash but it doesn't seem to work on board. I have a little animation in the timeline (1 s alpha animation 0-alpha 100 the Group of objects) and I wish she could play