Applescript hyperlink URL, not shared destination

Hi everyone,
i'm trying to write an applescript that will apply a hyperlink to some selected text (a product number). Where I am running into trouble is that the hyperlinks cannot be "shared destination".
After poaching what I could from some other scripts, I have this:
tell application "Adobe InDesign CS5"
    tell document 1
        set mySelection to selection
        set prodNo to contents of mySelection as string
        set prodNoURL to "http://www.webaddress.com/address/" & prodNo as string
        try
            set TheH to make hyperlink URL destination with properties {name:prodNo, destination URL:prodNoURL}
        on error
            set TheH to hyperlink URL destination prodNo
        end try
        set TheHS to make hyperlink text source with properties {source text:(item 1 of mySelection), hidden:false}
        set myHyperlink to make new hyperlink with properties {destination:TheH, source:TheHS, visible:false}
    end tell
end tell
end
This works, except that the resulting hyperlinks are linking to Shared Destination, which they cannot do (I don't know why, actually; my little script is just one step in a bigger process.)
How do I create a hyperlink that will link to URL, with the "Shared Destination" checkbox OFF:
Thanks for your help!
(Mac OS 10.7, ID CS5)

Hi,
If someone else has the same issue:
Set the "hidden" property of a hyperlinkURLDestination to TRUE when creating a new  hyperlinkURLDestination. This can only be done when the object is created and can't be modified later ...
var myCurrentHyperlinkURLDestination = myDoc.hyperlinkURLDestinations.add(myCurrentHyperlink, {hidden:true});
John

Similar Messages

  • Set InDesign -- by default -- not to make hyperlinks Shared Destinations?

    I have a newsletter template in ID CS4 based on a template with some standing hyperlinks to my organization's web pages.
    Recently, when I created a new file based on the template, my computer started bogging down looking NOT for the web page in the hyperlink, but in the copy of the InDesign file that created it. Checked the properties in Hyperlink Options, and instead of URL, the links went to a Shared Destination (a copy of the document on a shared drive, not an Internet server).  Changed the properties to link them to URLs instead, but when I opened the document again, they went back to Shared Destinations. How can I set InDesign -- by default -- not to hook hyperlinks up to Shared Destinations?  (My agency was ready to upgrade me to CS6 until it became available in the Cloud only).
    http://help.adobe.com/en_US/indesign/cs/using/WSB152EA6F-30D9-417c-9E16-A2C492C04892.html
    Note: If a URL hyperlink isn’t working in the exported PDF, there may be a problem with the hyperlink being a “Shared Destination.” Double-click the hyperlink in the Hyperlinks panel, choose URL from the Link To menu, deselect Shared Hyperlink Destination, and click OK
    But I wan to make NOT sharing hyperlinks the default

    Given the bug with shared hyperlinks (see https://forums.adobe.com/message/6408902#6408902), I too would like to turn off shared hyperlink destination as the default. Anyone found a way to do this?

  • Editing the list of shared destinations

    When I first started creating hyperlinks in InDesign, I mistakenly marked some as shared destinations. I regularly use a few URLs as shared destinations, but now I have a lot of redundant ones clogging up the list.
    How can I edit InDesign's list of (previously used) shared destinations? Does ID store an editable file in user/library or something similar? Or might it involve scripting (about which I know nothing)?

    You might want to give this thread a good read: How to clean up the list of recent files in the Getting Started Window?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Hyperlinks to external URL not working

    Hi folks.  I exported a CS4 indb to epub, opened it with Digital Editions, and clicked on a hyperlink.  The link activates my browser, but does not go to the actual page.   It just brings my browser to the front and displays whatever page was previously there.  It is not opening in a new tab  or in another window that is in the background.  So, as a test, I exported one of the book's indd files to pdf and clicked on the hyperlink.  This worked fine, it activated my browser AND displayed the correct page.  Any thoughts how to get Digital Editions to go directly to the URL, not just merely switch to the browser which shows whatever page was last opened?  Thanks!

    Also, just tested it in Calibre, and it worked.  Looks like a Digital Editions issue.

  • HT204093 I am following the instructions to hyperlink URL to an image in an email, but once I paste the URL, the "ok" button is not highlighted so I cannot complete the task. What is the problem and how do I get around it?

    I am following the instructions to hyperlink URL to an image in an email, but once I paste the URL, the "ok" button is not highlighted so I cannot complete the task. What is the problem and how do I get around it?

    I figured out if I took the http:// off the front of the URL, the "ok" button would highlight, but then link did not work. I tried just linking www.google.com to the image and the link did not work either. What gives?!

  • Shared Destination

    I am just about to create a catalogue, including hundreds of links and I've been trying to figure out what the 'shared destination' box is about in the hyperlink window but couldn't find a proper description just a couple of rather scary comments in the help section on the Adobe website.
    I just wonder if anyone here can explain it, I don't want to link 739 links then realise I should have done it differently...thanks!

    The "shared destination" is very benign. It simply means that the destination will be saved in the drop down menu so you can apply it to another link. If in fact your destination is a one time occurrence there is not need to make it a shared destination.

  • My buttons with hyperlinks are not browser compatible

    Hi, I've created an InDesign document that has simple buttons with hyperlinks and rollover stage. I have saved the document as an interactive pdf and uploaded to the site, when checking for browser compatibility, the hyperlinks are not working on Firefox 19.0.
    Does any one know how to fix this problem?
    Here is a link for reference:
    http://teen.idrivesafely.com/how-to-get-your-learners-permit.pdf
    Thanks

    I just found the answer in the following thread
    Hyperlink reuse
    go to the New Hyperlink button at the
    bottom of the panel or to the submenu in Hyperlinks, I can go to Shared
    Destination and...it DOES work. Thanks.
    Follow-up question: do I need to make all of the hyperlinks I create with
    Shared Destination or only those that will more than likely reappear in the
    document?

  • "Go to URL" not opening in a new browser window

    We are using FrameMaker 10 and RoboHelp 9 in a Windows 7 environment.
    When we create hypertext links, we use the "Go to URL" command.  According to the FrameMaker 10 online help, this is what the command is supposed to do: "Launches browser and displays the specified Web page."
    Then we publish the content to RoboHelp's WebHelp.
    When we see the hypertext link in the WebHelp/HTML output, it looks like this: http://www.adobe.com
    When we click it, the Web page appears inside the content frame of the WebHelp.  It does not open a new browser window.
    We can manually go into the html file and look at the hypertext link.  It looks like this in the WebHelp output:
    <span class="FM_Link"><a href="http://www.adobe.com">www.adobe.com</span>
    In order to manually change the link so that it opens the Web page in a new browser window, we can edit the link as follows:
    <span class="FM_Link"><a href="http://www.adobe.com" target="_blank">www.adobe.com</span>
    After we manually edit the HTML file, save it, launch the WebHelp, and click the hypertext link...it now opens the Web page in a new browser window.
    Is there a way to create the hypertext link in FrameMaker so that the WebHelp output will open the Web page in a new browser window?
    Thank you in advance!
    Tim

    Please see the previous posts in this thread to review how you create hyperlinks in FrameMaker that open the Web page in a new browser window.
    The problem is this: If you publish the exact same file to PDF, the hyperlinks will not work.
    The properties (syntax) of the hyperlinks in PDF output need to look like this: http://www.adobe.com
    The hyperlink syntax in WebHelp (in FrameMaker) needs to look like this: http://www.adobe.com" target="_blank
    (...so when they are published to Webhelp, they look like this: "http://www.adobe.com" target="_blank")
    Other than going into either the HTML or the PDF output and manually changing each hyperlink URL syntax for the specific output, is there a syntax that opens a new browser window in both PDF and HTML with one single "Go to URL" command?
    Thanks in advance for your help.
    Tim

  • Iweb Hyperlink Format not working!

    Hello,
    I am using version 3.0.3 of iWeb. I think this must be the latest version.
    No matter what I do, I cannot get the FORMAT tab to do anything within the hyperlinks section of the inspector.
    Let's I want to change the color of how a button behaves (rollover, click etc), I click on that element (text, box, anything), I select Inspector, I go to hyperlink tab, and the FORMAT subtab is not working.
    Has anyone else had this issue?
    What do i need to do??
    I'm totally frustrated.
    Thanks

    Hello Old Toad,
    Thanks for your response, but believe me, i've tried EVERYTHING.
    I've selected Text, I've highlighted the text, I've gone to the INSPECTOR window, selected the hyperlink tab, and the FORMAT TAB always remains INACTIVE: i.e. all the buttons are dark grey and do nothing when I press them.
    I paid for this software upgrade also (iLife 11).
    I really like iWeb actually, it produces what I want, except this formatting of URLs (and perhaps sub-menus).
    Im getting really desperate to find why my FORMAT of hyperlinks is not working.
    Thanks

  • Hiding the hyperlink  URL in a DataGrid

    Hi All,
        i am new to the development of .net iviews for the Portal.we have a table that consists of the links to the different reports, i am displaying this contents in a Datagrid using hyperlinkcolumn of the grid.when the user clicks on the hyperlinkcolumn a new explorer will open with particular report.here the problem is my manager dont want the url to be appeard at the bottom of browser when user places mouse over that hyperlink column.
      if any one can let me know how to hide the url, that will be very helpful to me.
    Thanks,
    Regards,
    Murali.

    Hi Murali,
    I've often heard people suggest Microsoft built the DataGrid as a control for use in their demos to promote .NET - it's nice but not terribly useful in its native form. I'd probably have to agree with that point of view.
    About the only way you can really achieve what you want is to catch the ItemDataBound event of the DataGrid control and add the relevant JavaScript attributes there. The ItemDataBound event fires as each item within the data source is being bound to the DataGrid, creating the contents of each row in the grid. With this event we're able to modify the HTML output as it's being created for output to the browser.
    Note that the ItemCreated event does a similar thing and is fine to use in this scenario, provided you don't want access to the underlying piece of data being bound to the grid, because it's not available at that point. For this reason, I'd suggest you use the ItemDataBound event so if you need to add data-related information in later on (such as changing the status message to a text description of the link that's stored in your data source) you can.
    Anyway, here's some sample code (written in VB.NET) that would do the trick; put this in your component's code-behind file:
        ' dgdTest is the name of the DataGrid control; change this to the name of your control.
        Private Sub dgdTest_ItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles dgdTest.ItemDataBound
            If e.Item.ItemType = ListItemType.Item Or _
                e.Item.ItemType = ListItemType.AlternatingItem Or _
                e.Item.ItemType = ListItemType.SelectedItem Then
                ' For each row that is output, add the onmouseover HTML attribute
                Dim cell As TableCell = e.Item.Cells(0) ' <--- change the index to the appropriate column index for your DataGrid
                If Not (cell Is Nothing) Then
                    ' TableCell generated for the row of data exists
                    Dim link As HyperLink = CType(cell.Controls(0), HyperLink)
                    If Not (link Is Nothing) Then
                        ' HyperLink control added for the HyperlinkColumn exists
                        link.Attributes.Add("onmouseover", "window.status=' '; return true;")
                        link.Attributes.Add("onmouseout", "window.status=''; return true;")
                    End If
                End If
            End If
        End Sub
    You'll need to set the index on the <i>e.Item.Cells(0)</i> above to the relevant zero-based index of the column that's your HyperlinkColumn; I've used zero here as the first column in the DataGrid.
    Note that we also check the Cells and Controls collections are valid objects to avoid a NullReferenceException.
    You'll also need to change the name of the DataGrid control in the method declaration to the relevant name of your control.
    Having said all this, have you considered other alternatives to the DataGrid? If you're just displaying data and not using the editing, paging or sorting features of the control, I prefer to use the Repeater. It gives you total control of the HTML that's output and would eliminate the need to stuff around with the ItemDataBound event in this scenario.
    Hope this helps.
    Cheers,
    Mal.

  • How to represent # in hyperlink URLs

    I have a series of URLs that I want to use in hyperlinks, that all have a hash character in them. The hash character is necessary to load the page properly.
    However, when I enter the URL "as is", the hash becomes %23 in the address bar, and the page does not display correctly.
    The only method that works so far, is to replace the "#" with "&hash;".  This works, but leaves "&hash;" in the url, unchanged.  It also means I have to massage every URL.
    That's not really a problem for my current purposes, but am wondering of there is a way to end up with just # as the final representation in the address bar of the browser.
    What I've tried so far (in the hyperlink url):
    Fails:
    %23
    char(35)
    OK:
    &#35; (becomes &%2335;)
    &hash;
    Any ideas? :-)

    The hyperlink function is fine. It's just that if there is a hash in the resulting hyperlink, then when I click on it, the browser interprets the hash as "%23" and then the page doesn't load properly.
    Might be just that site, and/or just that browser.
    Here's a sample link:
    http://www.nlm.nih.gov/cgi/mesh/2012/MB_cgi?mode=&term=Body+Regions&field=entry# TreeA01
    Safari is my default browser.
    Obviously, if I copy that link into Safari, there's no problem.
    The problem lies in the interface between Numbers sending the link, and Safari interpreting what was sent.

  • Dynamic URL not working in email

    I have a question on dynamic URL. In my report I have a help image which has hyperlink (when you click on the image which will take you to a help PDF file on the SharePoint) . This hyperlink is working fine in the browser but when I email the report 
    my Hyperlink is not working as there will be no server name to dynamically pick up in the email. I am using Java Script can any one tell me how can I make my dynamic hyperlink work in the email without hardcoding the URL.
    My current URL:
    =”javascript:void(window.open(‘http://’+window.location.hostname+%20′/Library/Reports/Report%20Test.pdf’,'popup’,'target=_blank,resizable=1,toolbar=0,menubar=0,location=0′))”
    Thanks in advance.

    Hi Ranjith,
    Based on my test, javascript URL cannot work when we email report use MHTML format. However, it is fine when we view the email in a web browser. If we are use original URL, it is work fine no matter which format we are use. Please try to use original URL
    in the report to check if the issue is persist.
    If the issue is persist, please clarify the render format of the subscription. It is benefit for us to do further analysis.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • A base URL and shared secret - when dio you get these?

    My boss is the administrator for our universitys iTunes site. We are not public yet. I aked hime for the base URL and shared secret code adn he said he never got them. So when do we get them? We need them to program the API. De we need to set the site to "Borwse" to have them sent?
    If they were sent and lost can they be re-sent?
    Thank you,
    Chip

    Chip,
    If students, faculty, and staff can get to your site through a portal ... if your boss can access your site as an administrator, then there is no way that Apple did not send those strings to you. On the other hand, if you have never, ever accessed your iTunes U site, then it might be possible that you never generated site strings and your boss could very well be correct.
    Generally speaking, when you get a new iTunes U site approved, Apple sends the e-mail address listed on your school's application a "welcome" e-mail that contains a link that opens iTunes and shows you your site strings. If you don't have your admin credential handy, you can always return to get a copy of those strings, but only if you've previously associated an iTunes U administrator with an Apple ID (an Apple ID is the same ID you'd use, say, to buy music from the iTunes Store itself).
    If you no longer have that welcome e-mail or your site strings, you can ask that Apple resend that welcome e-mail ... and the best way to do that would be to contact your local Apple account executive or Apple service engineer and arrange it through them. If you don't know to whom you belong, we can help you find out.

  • In ical edit, can you get rid of invitees, availability, url, notes?

    in ical edit, can you get rid of invitees, availability, url, notes?

    in ical edit, can you get rid of invitees, availability, url, notes?

  • I have both my iPhone and iPad backing up via iCloud, but they are not sharing the information between devices ie if I purchase an app on one it does not transfer to the other although the backup is successful via iCloud.

    I have both my iPhone and iPad backing up via iCloud but the data is not being shared between the devices. When I backup it appears to be working as there are no error messages but the data is not shared between each. Any help would be great as this is very frustrating.

    Backing up to icloud is not the same as syncing data between devices.  Go to
    Settings>Store.  Turn on the automatic downloads that you want on that screen.
    Settings>iCloud.  Turn on the features you want to sync between devices.

Maybe you are looking for

  • Actions not appearing in Action Drop Down Box

    We are in the process of upgrading from 4.0 to 7.0, in 4.0 we have used SAP GUI as the main UI, we are due to go-live with the upgrade very soon and have a problem when creating an opportunity through to a quotation within the SAP GUI Screens, we nee

  • How do I speed up Lightroom on my new Mac Pro (2013)?

    I have tried everything suggested in the forums like running imports in parallel, etc., and all my data is on the super fast built-in PCI-Express SSD of the Mac Pro. However, I have numerous speed problems with Lightroom 5.3 (latest version) when imp

  • Lightroom on a Mac and PC?

    I've been evaluating Lightroom on my Windows XP PC.  I've been using too many tools to process and index my Nikon NEF files.  I like what I see from Lightorrom. I'm in the market for a notebook to take on the road with me for jobs.  I'm stuck between

  • ADF Faces & BC: How to mix JSF EL AND conditions

    I'm trying to do something like the following on an executable defined within my pageDef: RefreshCondition="#{processScope.editRecord==false} && ${ adfFacesContext.postback}" What should be the proper syntax? Many thanks, Wes

  • Password file corrupted

    What is the steps taken to create a new password file?