Edit code for change drive letters in paths for links, to also work with Fonts that have been moved.

I have the following code that looks through my links and changes all of the drive letters to the new locations where they exist.  So if something stays in the same folder structure, but moves to a new drive E: and InDesign can not longer find it, you can run the code and have it fix them all.
Well I want to do the same but for fonts that have also moved.
Thank you in advance for any and all help!
if (app.documents.length == 0) {
    err("No open document. Please open a document and try again.", true);
if (File.fs != "Windows") {
    err("This script is for Windows only.");
var myDoc = app.activeDocument;
var myLinks = myDoc.links;
var myCounter = 0;
if (myLinks.length == 0) {
    err("This document doesn't contain any links.", true);
var mySettings = CreateDialog();
for (i = myLinks.length-1; i >= 0 ; i--) {
    var myLink = myLinks[i];
    if ( myLink.status == LinkStatus.LINK_MISSING || (myLink.status != LinkStatus.LINK_MISSING && mySettings[2] == false) ) {
        var myOldPath = myLink.filePath;
        var myNewPath = myOldPath.replace(mySettings[0] + ":\\", mySettings[1] + ":\\");
        var myNewFile = new File(myNewPath);
        if (myNewFile.exists) {
            myLink.relink(myNewFile);
            try {
                myLink.update();
            catch(e) {}
            myCounter++;
if (myCounter == 1) {
    alert("One file has been relinked.", "Finished");
else if  (myCounter > 1) {
    alert(myCounter + " files have been relinked.", "Finished");
else {
    alert("Nothing has been relinked.", "Finished");
function err(e, icon){
    alert(e, "Change drive letter in path", icon);
    exit();
function CreateDialog() {
    var myDrives = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "y", "Z"];
    var myDialog = new Window("dialog", "Change drive letter in path");
    var myPanel = myDialog.add("panel", undefined, "");
    myPanel.orientation = "column";
    myPanel.alignChildren = "left";
    var myGroup = myPanel.add("group");
    myGroup.orientation = "row";
    var myStText1 = myGroup.add("statictext", undefined, "Change ");
    var myDropDownList1 = myGroup.add("dropdownlist", undefined, myDrives);
    if (app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl1") != "") {
        myDropDownList1.selection = myDropDownList1.items[app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl1")];
    else {
        myDropDownList1.selection = myDropDownList1.items[2];
    var myStText2 = myGroup.add("statictext", undefined, " to ");
    var myDropDownList2 = myGroup.add("dropdownlist", undefined, myDrives);
    if (app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl2") != "") {
        myDropDownList2.selection = myDropDownList2.items[app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl2")];
    else {
        myDropDownList2.selection = myDropDownList2.items[3];
    var myCheckBox = myPanel.add("checkbox", undefined, "relink only missing links");
    if (app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_checkbox") != "") {
        myCheckBox.value = eval(app.extractLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_checkbox"));
    else {
        myCheckBox.value = true;
    var myButtonsGrp = myDialog.add("group");
    var myOkBtn = myButtonsGrp.add("button", undefined, "Ok", {name:"ok"});
    var myCancelBtn = myButtonsGrp.add("button", undefined, "Cancel", {name:"cancel"});
    myOkBtn.onClick = function() {
        if (myDropDownList1.selection.index == myDropDownList2.selection.index) {
            alert("Both drive letters should not be the same.", "Change drive letter in path");
        else {
            myDialog.close(1);
    var myDialogResult = myDialog.show();
    if (myDialogResult == 1) {
        app.insertLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl1", myDropDownList1.selection + "");
        app.insertLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_Ddl2", myDropDownList2.selection + "");
        app.insertLabel("Kas_UpdatePathNamesAfterDriveLetterChange_3.0_checkbox", myCheckBox.value + "");
        return [ myDropDownList1.selection.text, myDropDownList2.selection.text, myCheckBox.value ];
    else {
        exit();

ok, so I have discovered where the issue came from...
The code you helped me with before, were I removed all links and my link character styles that I had (found here: http://forums.adobe.com/message/5881440#5881440)
Well it set all the items I was finding/replacing to unknown fonts that my machine doesn't have (Like Helvetic Neue Bold, instead of just Helvetica Bold, etc).
Is there an easy way of fixing this?
The only way I know to fix it right now is:
Go to Package >> go to Fonts >> Select the the font that says it's missing >> Select Find First >> CLOSE ALL OF THIS, then use the eye-dropper to select the text around that font which copies the formatting and then apply it to the text who's formatting got messed up.  And then start the process all over again for the next occurence of that word whose formatting got stripped.

Similar Messages

  • Lightroom does not automatically find images that have been moved within same parent folder/drive

    Lightroom does not automatically find images that have been moved within same parent folder/drive...I moved my catalog and photos to shared drive so that all users can access and when I moved photos within parent folder lightroom did not automatically adjust like in video I watched.  I had to manually locate.  Is there a fix for this?

    Lightroom does not automatically find images that have been moved within same parent folder/drive...I moved my catalog and photos to shared drive so that all users can access and when I moved photos within parent folder lightroom did not automatically adjust like in video I watched.  I had to manually locate.  Is there a fix for this?
    I haven't watched that video, but if you move photos in your operating system ... Lightroom does NOT automatically find these photos. Finding photos that have been moved is NOT a feature of Lightroom. So, there is no fix for this.
    You would have to tell Lightroom where the photos are now located, as explained in the link from 99jon
    If you must move photos, move them inside of Lightroom, not in your operating system, or better yet — don't move them, and use Lightroom tools such as keywords and other metadata to achieve organization.

  • How to set the default path of the tag while working with xtype "tags"

    Hi,
    I am working with xtype tag, where i have to select tags in the dialog box. Everything is fine, but my requirement is set the tags path.
    Currently it is defaulted to /etc/tags and showing all the tags. Instead i have show only the single tag path that is required for me.
    Is there any way where i can set the root path and set to my custom tag path like: /ets/tags/mycustomtags/
    Thanks for the support in advance
    Riyaz

    Hi,
    Use namespaces property to set the path. But it only works with namespaces that you directly creates under /etc/tags
    so for example if you want to use or show two namesapces /ets/tags/mycustomtags & /ets/tags/mycustomtags1
    then set this property as
    namespaces       string[]             mycustomtags  
                                                       mycustomtags1
    and if you have only want to show one then
    namespaces       string[]             mycustomtags
    I hope it will help you.
    Also refer http://dev.day.com/docs/en/cq/current/widgets-api/output/CQ.tagging.TagInputField.html
    Let me know if you need more information.
    THanks,
    Pawan

  • :-)  How can we change the default file path for Bank file ( dmee ) ?

    Hi All,
    We encounter a problem.
    Electronic bank file ( created after a F110 run ) are created, in an automatic way to the DIR_TEMP directory. ( On the SAP server )
    How can we change the default file path for Bank files ( dmee ) ?
    We'd like to specify another path.
    Thx for your help.
    Erwan

    Hello,
    Make sure that you have created the directory in transaction code AL11 with the help of basis consultants.
    You can link your PC directory to the application server.
    You can maintain the path whether your file needs to get saved in OBPM4 against your DMEE structure example GB_BACS etc.
    If you do not maintain any path in OBPM4, then the file gets saved to temporary directory. If you give the directory path name in OBPM4, then the file gets saved to that directory with numbers 0001, 0002, 0003 etc till it reaches 9999 and reset from the beginning.
    If you give the path as well as file name as ABCD, then the file gets generated to that directory folder with ABCD0001, ABCD0002, ABCD0003 etc. till it reaches ABCD9999 and reset from the beginning.
    Hope this solves your problem.
    Regards,
    Ravi

  • Key shortcut, issue, typing something in editing code and changing language going directly to snippets.

    Key shortcut, issue, typing something in editing code and changing language going directly to snippets.
    So the problem is that I have to click in the editing code again to write in different language, which it didn't happened before.
    Just in case of shortcut keys collision I completly removed the shortcut of snippets from shift+F9, nothing changed. I really can't understand why when I press Alt+Shift to change language it goes straight to the snippets.
    If anyone can help would save me from nervous breakdown! 
    Thanks,
    GKD

    Since this appears to be a "just started happening" issue, have you tried clearing the program cache?
    Deleting a corrupted cache file
    That tends to catch a lot of weird behaviors and straighten them out.

  • Have 4S and when syncing with iTunes using WiFi I get waiting for change to be applied.  But this seems to never end.  I have waited for an hour and still getting message.

    Have been attempting to sync my iPhone 4S with iTunes using WiFi.  It appears to complete the 5 or 6 syncs, but then waiting for change to be applied comes up and it never completes the sync.  Waiting for changes to be applied continues for every.

    ALSO, on the iPod under Settings>General>iTunes Sync, you may need to back out of the "iTunes Wi-fi Sync," and reopen it to get it to update.
    (I use iTunes 11.1.5.5)

  • Can the apple external disc drive that I just got for my air also work with my late 2007 macbook pro?  The internal disc drive broke after apple care expired, natch.

    Can the apple external disc drive that I just got for my air also work with my late 2007 macbook pro?  The internal disc drive broke after apple care expired, natch.

    No, sorry. it won't work with the 2007 MBP. You can replace the optical drive yourself - just go shopping at OWC.
    Good luck,
    Clinton

  • Getting letters for items that have been removed from my credit report

    I have gotten several credit cards in the past month as I have been working on rebuilding my credit. Over the past few weeks I have been receiving letters from collection agencies for items that have been removed from my credit report. Has anyone else had this issue? Should I just throw this stuff away since it's not longer being reported on my credit report and the collections are so old they've been removed from the report? I am freaking out a bit. Any advice is welcome.

    wonderwoman1970 wrote:
    They were removed because they are over 8 years old.They can still try to collect, they just cannot place it on your reports. If its also beyond SOL in your state, you have to option to sent them a Cease Communications letter, charmingly refferred to as a FOAD letter. (Google it to find the meaning of that acronym).They will just sell it to another JDB, who may send you another collection notice. Keep all correspondence regarding this debt in order to keep track of it. You also have the option to settle it for a small percentage - I would suggest offering no more than 5-10% of the original amount (not some inflated "new balance"), and in your offer letter refer to it as "old, time barred debt, that is not a current financial obligation" but that you are willing to settle only to close out the account.

  • I have a problem sending mail via smtp. I use a satellite system and the average return time for a ping is 675ms. Is this a problem with mail? If so can I change Mail to accept it. The problem also exists with Lion

    I have a problem sending mail via smtp. I use a satellite system and the average return time for a ping is 675ms. Is this a problem with mail? If so can I change Mail to accept it. The problem also exists with Lion and on both my MacPro and my wife's Imac. I also see my mailboxes randomly disconnecting and reconnecting. Any other ideas of a possible cause?

    I solved it myself, after the "note" which came back from FF/Mozilla just as I finished my message, commenting on what it was that my system had , I wnnt back to check my plug-ins etc. I downloaded the latest Java, BOTH 32bit AND 64 bit versions and latest Firefox.
    Now all is working.
    Thanks,
    B.

  • Has anyone had problems with the latest driver update for the Lexmark printers? My Lexmark printers won't work with the latest driver update.

    Has anyone had problems with the latest Lexmark printer driver update? My Lexmark printers won't work with the latest driver update. If I reinstall an older version of the drivers, they work.

    Mine crashed once with new update, but working fine.
    I had to delete old printer, restart iMac, and then reinstall
    new drivers to get it to work. Would not complete without
    the restart after deleting non-working printer. No problems
    since and all features working.

  • Does anyone know why Adobe CC is failing recognise or open files taken on a Nikon D4 that have been previously edited in CS5?

    I'm just migrating some of my image archive across from one hard drive to another.  During the process, I checked the files in Bridge to see that they'd copied correctly.  It was here that I noticed that for some reason, in every folder that I've moved, there are at least a few images that it fails to recognise.  These images are listed as having no camera model and no serial number.  Attempting to open them in Photoshop CC says that it is an unrecognised file.  Bridge struggles for a while, manages to eventually recognise a lot of them but always leaves a few that it cannot work with.
    Having looked at the original drive, the files are fine and open perfectly.  One thing that I've noticed is that some (not all) of the now corrupt files have been previously edited in CS5.  Removing the sidecar xmp file makes no difference.  Purging the cache makes no difference.  Repairing permissions makes no difference.
    I am running OSX Mavericks (10.9.3) and have the latest updated version of CC.
    Please help!
    Leon

    I'm using an Intel iMac, 3.6Ghz Intel core i5 with 12GB of 1333 Mhz DDR3 RAM.
    The iMac has OSX 10.9.3 installed with all of the latest updates.
    I'm using Adobe CC with all of the latest updates installed so Bridge is version 6.0.1.6.
    I have repaired permissions, rebooted the Mac, re-started Bridge and cleared the Bridge cache.
    The raw files are .nef files from a Nikon D4.  They are currently stored on an external Western Digital red hard drive and all of the images are accessible and load correctly.
    In moving the files across to a new Western Digital green drive, Bridge is failing to create some of the thumbnails.  After waiting for all of the thumbnails to be created, the remaining files are simply displayed with a nef files icon.  Any attempt to open them fails, with Adobe Photoshop CC displaying a message stating that the file is not in a format that Photoshop can understand.
    On investigating further, I have found that the images that are causing issues are ones that have been edited before and have sidecar .xmp files.  These .xmp files were created during editing when using Adobe Photoshop CS5.1.
    I hope that's everything that you requested.
    Leon

  • My old appleID use email with domain already deactivate. So I changed my appleID and primary email and now I can not access iCloud with iOS7. ICloud shows my old appleID but I can't change it. How do I get iCloud to work with my updated ID?

    My old email that using register for apple ID cannot access/check any mail because that domain already deactivate.
    So I changed my appleID and primary email and now I can not access iCloud with iOS7. ICloud shows my old appleID but I can't change it. How do I get iCloud to work with my updated ID?

    Hi ccharat,
    Welcome to the Apple Support Communities! It sounds like you did a good job editing your Apple ID and primary email address, but you didn’t sign out of iCloud on your iOS device before hand. What you may need to do in this situation is go back to the Apple ID website and edit your Apple ID and primary email address back to the email address that is signed in with iCloud (there is no need to verify the account after editing it back to the old account, just changing it back is enough). Once your Apple ID is back to the original account, delete the iCloud account from the iOS device and be sure to keep all info on the device when prompted. After you delete the iCloud account, go back to the website and edit your Apple ID and primary email address back to the new address. Once it is back to the account you would like, you can sign into the iCloud on the iOS device with that new account and merge all of the data when prompted. Please use the following article as a reference.
    iOS 7: If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/kb/ts5223
    Change your Apple ID temporarily
    If signing out and back in to iMessage or FaceTime didn't help, try these steps:
    Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
    Go to Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
    Scroll down and tap Delete Account, then tap Delete to confirm.
    Tap “Keep on My [Device]” or “Delete from My [Device].” In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
    Enter the password for your previous Apple ID.
    Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
    Return to Settings > iCloud and sign in with your new Apple ID.
    I hope this helps,  
    -Joe

  • I'm moving an internal hard drive from an old computer to a new computer.  How do I transfer the catalog data to my new computer so the Organizer of Photoshop Elements 6 will find the data on the hard that has been moved to the new computer?

    I'm moving an internal hard drive from an old computer to a new computer.  (My new compute runs Windows 8.1) How do I transfer the catalog data to my new computer so the Organizer of Photoshop Elements 6 will find the data on the hard that has been moved to the new computer?  Is this possible or do I have to use the procedure of copying the catalog along with the photos to a back up hard drive and then restore them on the new computer?

    The 'normal' procedure is to do a PSE organizer backup (not a copy or a backup from external tools) to an external drive, then a restore to the new location.
    The advantage is that you have a backup of both catalog and media files and you don't have all disconnected files, which would happen with external backup tools. Also, if you restore with a more recent elements version, the catalog will be automatically updated to the new format.
    The drawback in your situation is that you'll have either to overwrite all your files or restore to a custom location, creating a duplicate photo library (which supposes you have enough free space).
    It would be possible to simply use the organizer in the old PC to move the catalog to a new 'custom' folder just under your C: root drive. The catalog would be accessible once the drive will be installed in the new PC. Then you would have all files 'disconnected' due to the fact that all your media files are now on a drive with a different letter. Reconnecting a whole library is a hard job with PSE6, less so with PSE11/PSE12.
    If the idea of fiddling with the sqlite database with external sqlite manager tools is ok for you, I can describe the process more in detail. You only copy your catalog folder (as suggested above) to another location. Instead of trying the 'reconnection' way, you install the sqlite utility on the new computer. When the old drive is installed in the new computer, you simply edit a given record in the catalog database, catalog.psedb, and start the organizer with your copied catalog by simply double clicking the 'catalog.psedb' file.
    Even if the last solution is much, much quicker, I would still create a new PSE backup : you have never too much safety .

  • Captivate 5 - issue with editing imported PowerPoints that have been resized

    I'm having an issue with editing PowerPoint files that have been imported into Captivate 5 when they have been resized within the Captivate project after the initial import.
    1. I import a PowerPoint presentation into 800x600 dimension.
    2. I resize the project to 900x600 by not locking the aspect ratio and selecting to position to the top right so there is a 100 pixel strip to the left of the slide that we use for navigation buttons and other info.
    3. If I need to make a change to a PowerPoint, I select Edit > Edit with Microsoft PowerPoint > Edit Slide (or Edit Presentation).
    4. The slide opens in PowerPoint and I make the changes and click Save.
    5. When the slide is imported back into Captivate, it is stretched and resized to not fit either 800x600 or 900x600, but something in between. This did not happen in Captivate 4 - the slide would retain the 800x600 dimension slid over to the right with no issues.
    Are there any settings that can be done to ensure the edited slides will import back into the project with the correctly sized dimensions for the current project?

    Hi there
    I agree that it would be nice to see a notification. You know, Captivate offers a special area for notifications that appear when you open it. I'm stymied as to why Adobe doesn't use this area for making such announcements.
    Cheers... Rick
    Helpful and Handy Links
    Begin learning Captivate 5 moments from now! $29.95
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • We have two users that have been using Creative Cloud for almost a year. Recently, sometime in the last 4ish weeks, the users can no longer run Creative Cloud apps. (Yes, our subscription is paid.) Error simply says administrator access is required

    We have two users that have been using Creative Cloud for almost a year. Recently, sometime in the last 4ish weeks, the users can no longer run Creative Cloud apps. (Yes, our subscription is paid.) Error simply says administrator access is required to install. The apps have already been installed. The users cannot run them unless they are in the local admin group.Using "Run as admin" does not work. It gives the same error.
    I have opened a case with adobe support and was basically told to suck it up and put the users in the admin group. Actually, what was said was that it is "mandated that the users have administrative rights". 
    There are a couple of things wrong with this. It was working for both users until recently - a recent required creative cloud update. The users have never been local admins yet the apps were working (poorly, but working).
    We are in an enterprise environment and users simply do not have administrative rights on the computers.
    I have changed permissions on all adobe folders, granting users or authenticated users modify or full control rights, did the same in whatever Adobe registry HKLM keys I could find. Nothing has allowed the users to run the apps - unless they are put in the local admin group.
    Someone has to have a fix for this. Adobe apps have proved to have far too many vunerabilities to even entertain the idea of elevating user rights. I can't imagine that enterprise environments are allowing this.
    Any help or suggestions are greatly appreciated.

    Jeff,
    Thank you for your response. The users in question are "standard" domain users. We do not reduce users permissions below the standard level.
    The apps do not load with their current standard user permissions.
    The thing that makes this odd, is that up until recently they did this issue with cloud apps. The only way I can make it work for them now is to put them in the local administrator group on their pc's - which is not going to happen.
    This is what they now see. As I said before, this was not a problem up until recently they would see all their available apps. If I put them in the local admin group the apps are listed without having to install. Everything is there, just not accessible to the user.

Maybe you are looking for

  • How to get rid of character (A, B or C) in a field after space.

    HI All I have a field of length 18 i.e char 18 (MATNR) It can have values as below      u2018AE10036   Bu2019                                                      u2018AE10091  A u2019                                                      u2018AE10116

  • Transfer photos to memory card

    I have a 2GB memory card. I am trying to load it with 144 MB of photos. It accepted about half of the photos and now, after exporting the photos to my desktop and trying to copy them onto the memory card, I get the message: "cannot be copied because

  • Reading a binary file (byte swapping?): HELP!

    Hi, Below are 2 simple programs, one in C and the other in Java that read a binary file. The first 3 integer numbers read by the C program are: 910, 1024437292, 100002 The first 3 integer numbers read by the Java program are: -1912406016, 749473597,

  • Find my iPhone has changed recently. Now how do I centre it?

    I use "Find my iPhone" to track where my wife is, which can be very useful for both of us. There now seems to be no way of centering the position of the 'phone, once the map has been moved slightly. If the 'phone has move a lot since I last looked at

  • Reading .csv Files & Empty List Elements

    I have an application allowing users to upload .csv files for import into a database. The issue is however, that in some cases every column in the csv file will be populated, and in others, not. As ColdFusion ignores empty list elements I cannot accu