Get the metadata from the images information (CS3, AS, JS)

I tried using AppleScript and JavaScript to get the photo captions using linkXmp.description.

This works when the image has been edited in Photoshop, but not when it has just been imported into the page and done nothing for her... The answer is "No metadata information available", a fair enough answer because it don't disagree that the information might be there.

I got a job AppleScript which goes to Photoshop, opens the picture, gets the information, which is closed without saving changes and returns to InDesign to put an overlay on the image with its legend information. The time delay involved in the image opening is irritating, however.

I tried initially in AppleScript, and when the offer read in the archives of this forum on the edition vs original problem.

So, I headed over to the Photoshop Forum where a helpful guy gave me a fragment of AppleScript to get information of legend and a fragment of JavaScript to get the linkXmp.description in InDesign.

I just finished adapting the JavaScript to work with a selected InDesign page item (learned much in the process). But in the end that I was confronted with the same brick wall I met with AppleScript. If the pic is not changed, no dice.

My friend Photoshopping was surprised that I did raise my difficulty in the InDesign Forum... which I do now, with apologies to all those who may have read passed me on the road to this topic.

Yes, there is an InDesign only method to obtain this information from legend?

In the case that everyone faces in this here is an example that tries to get the legend of the bridge for files that have not given xmp.

#target indesign
main(); // Call to the main function
function main() {
     if (app.documents.length == 0) {
          alert("Please have an 'Indesign' document before running this script.");
          return;
     }
     docRef = app.activeDocument;
     with(docRef) {
          // try reading linkXmp
          var caption = links[0].linkXmp.description;
          if( caption == "" ) getCaptionFromBridge( links[0].filePath );

     }
     return caption;

     function getCaptionFromBridge( fileName ){
           var cap = undefined;
           function myReturnValue(cap){
                //do what you want with the results
                 cap = cap;
                caption = cap;
           }
           var bt = new BridgeTalk;
           bt.target = "bridge";
           var myScript = ("var ftn = " + psRemote.toSource() + "; ftn("+fileName.toSource()+");");
           bt.body = myScript;
           bt.onResult = function( inBT ) {myReturnValue(inBT.body); }
           bt.send();
           bt.pump();
          $.sleep( 100 );
          var timeOutAt = ( new Date() ).getTime() + 500;
          var currentTime = ( new Date() ).getTime();
          while ( ( currentTime < timeOutAt ) && ( undefined == cap ) ) {
               bt.pump();
               $.sleep( 100 );
               currentTime = ( new Date() ).getTime();
           }
           function psRemote(fileName){
           var file = new File(fileName);
           var tn= new Thumbnail(file);
           var md = tn.synchronousMetadata;
           var caption = md.read('http://purl.org/dc/elements/1.1/',"description/*[1]");
           return caption;
           }
     }
}

Tags: InDesign

Similar Questions

  • I have my Dell XPS HDMI cable to my Sony Bravia TV / I get the image on the TV but the sound from the laptop

    I have my Dell XPS HDMI cable to my Sony Bravia TV / I get the image on the TV but the sound from the laptop

    Thank you.  I had to go to the sounds and have speakers/headphones to HDMI it didn't work at first but founmd you need to have the TV and the computer.

  • How can I get the image of the Web page when my mouse over the icon in the taskbar?

    I used to get the image of some Web pages I look at one when I spent my mouse on the browser used in the taskbar, now, I only get the Scripture that says what pages are open, how to get back the images? It facilitated visually for me to see.

    Hello

    Are you referring to the feature Aero Peek in Windows 7?

    You can use Aero Peek to take a quick look at other open windows without clicking away from the window you are currently working. For more information, see Preview an open window on the desktop using Peek.

    You may experience this problem if PEAK Aero is disabled on the computer.

    If you can not see the effects of glass window, or if you are unable to use Aero Peek and Aero Shake, use the Aero troubleshooting tool to diagnose and fix the problem automatically.

    Solve problems Aero in Windows 7

    http://support.Microsoft.com/kb/976170

    You can also go to the Control Panel - Performance and options (find it by typing in the search box) - and set for the "look better".

    I hope this helps. If you need help with Windows, let us know and will be happy to help you.

  • I can't seem to connect to my mail, I tried all the user names I can think. where can I get the correct information?

    I can't seem to connect to my mail, I tried all the user names I can think.  where can I get the correct information?

    Sounds like Hotmail you use. Yes?

    If so, repost to Forums Hotmail - Hotmail Sign In IssuesThreads section:

    http://windowslivehelp.com/forums.aspx?ForumID=b782602b-8e7c-40D8-a66b-b44824497a17

  • With the help of LR4 with Windows 8 - impossible to get the images to desempilement.

    Using LR4 with Windows 8 - impossible to get the images to desempilement.

    Right click on the picture, select stacking, select Unstack

  • Cannot make the fx color correction without getting the image of strobe

    Cannot make the fx color correction or blur fx with masks without getting the image to strobe. Do not return in the sequence, or export without the video strobe effect. It is clearly a problem since at least 2011 because I saw some forum posts dating back that far. Don't know how or why it is always a question 5 years later. I have the correction color fx on an adjustment layer that makes very well. Leave color and blur fx on a couple of individual clips is whats creating the problem. Does anyone have a solution? It does not appear that I can wait for Adobe.

    At this point, I would create a sequence for each clip (in the garbage, make a right click, create sequence and apply the FX it) then replace the clips in the mixture with the sequences.  -Test this point by one before they go crazy.

    OR, using the idea of sequence preceding above, return on a new clip with holiday color applied to replace as new originals in the mixture.

    Third idea: replace the clips with linked AE comp and try the color of leave which are.

    In short, do what you can to take the color of leave out of the final equation.

  • How to get the specific information of hardware and software data center

    How to get the specific information of hardware and software data center with powercli...

    What kind of information you need?

    No matter what Esxi host hardware info., if so could below thread is useful.

    Information about the host material with information on the nic and HBA drivers

  • I can't upload an image under license. I always get the image in low resolution. How to solve the problem?

    I can't upload an image under license. I always get the image in low resolution. How to solve the problem?

    Follow these steps to download or save in the library: I downloaded my 10 free images and they all have the Adobe watermark on them, so I can't use them. Why do they have a watermark on them?

  • I am new to Adobe Stock.  An Adobe stock image is usable like a Facebook profile picture?  My concern is that the image profile can saved by other users of Facebook... so they can get the image without having to pay Adobe for it.

    I am new to Adobe Stock.  An Adobe stock image is usable like a Facebook profile picture?  My concern is that the image profile can saved by other users of Facebook... so they can get the image without having to pay Adobe for it.

    Hi martyc98498222,

    I suggest you to use the Image of Adobe Stock for social media, also you can refer to the following document: https://helpx.adobe.com/stock/faq.html#Adobe%20Stock%20usage%20and%20licensing

    Kind regards

    Tanuj

  • I'm editing in the bright room of Adobe and when I change in the develop module, I get the image I want, but when I see in the library module in its final State, it changed and degraded. Why is this happening?

    I'm editing in the bright room of Adobe and when I change in the develop module, I get the image I want, but when I see in the library module in its final State, it changed and degraded. Why is this happening?

    The difference between the raw edition photo and editing a PSD is that the PSD has black points and white pinned to the visible pixel values, the raw photo has still "headroom" with values of pixel darker than black visible and brighter than white, so when you export the raw file , there may be details that have improved (or obscured if it was another type of image) of the perception and mapping of the Compensation of the black spot on the final color profile.

    This means not PS is better or LR is lower, it is enough for you to go to a different type of image.  If you don't have PS to do final Assembly, you can probably do the same thing by exporting the raw in a 16 bit ProPhotoRGB TIF file, re-import this TIF and then set it LR, possibly using the tone curve to make the pitch black dark areas.

  • How can I get the image that provides information on social media sites when I put my website on a position to be different from what it is

    If you put in my Web site addresses of customers on social media sites (like Facebook and Pintrest) image that filled is not the image we want. How do I change of these images so that's their logo or a linked picture.


    serenity post example.png

    Hi there, you need to read (just google it) on the metatags for social media

    Google ' media meta tag social og "and you get several guides that explain what they are.

    You can then apply to your layouts depending on the module and use cases.

  • How can I get the images to display in order of filename on my iPad?

    I have about 800 images I use in teaching Kinesiology, and their file names provide the structure (they are named by the chapter number then the image).  How can I get to display in order of file name in 'photos' on my iPad?

    Second, how can I check the file name while I look at the pictures (so I can see where I am in the bridge of 800 and also inform students what image I'm referencing)?

    Thank you!

    I'm sorry but there is no way to do this. The iOS system is currently not able. This article can help explain how iOS displays images.  Order of Photos in iOS

    The only alternative would be to create an Album in the Photos App (you can rearrange manually) or use a 3rd party App. None Displays the names of files. You may need a MacBook to do what you want.

  • Get the image of Excel as a form and save it as a .jpg

    Hello

    I am fairly new to ActiveX and will have a hard time to do a seemingly simple thing: get an image named from an Excel file and save it as a .jpg file.  I've seen similar things for Excel chart objects, but as I understand it the images are "shapes" in Excel and I was unable to find the right method to extract a form. Please, if someone could look at the folder below and tell me if I am on the right track, if there is a better way to do it, or if there is a way to do it at all, it would be useful.  Note that I don't like not how effective a strategy - if I need to register in a middle of another type file, that's fine. The only goal is to be able to extract this image and save it with a click of mouse and without manual intervention.

    Folder contains: 1 example Excel file containing the image named "picture 1"; 1 vi showing the method I found for the export of Excel graphs as .jpg; and 1 vi with the progress that I've done so far tried to get the picture of the Excel file and save it as a .jpg file.

    Thanks in advance!

    Megan

    Hi megan,

    See what link.

    It will be useful.

    Mike

  • Resizing of the Image of CS3 is no longer works

    I open a JPG file in Photoshop CS3 to resize a photo.

    Much to my surprise, the pixel dimensions in the Image-> Image size no longer works. The pixel Dimensions box displays information, but is not highlighted and does not allow access.

    I tried a bunch of different pictures, including JPGs, naves and several PSD files, I worked on the last few days. Same result.

    I closed the PS, rebooted, reloaded, same problem.

    I am running Windows 7 and PS3 10.0.0.1. I have never had any problems with this before combo; certainly nothing like.

    Thanks for everything... Help!

    EdB

    Sreenshot of the Image Size dialog box:

    Capture.JPG

    Check the bit called resample and resize away.

    More information:

    http://www.photoshopessentials.com/Essentials/resizing-vs-resampling2.php

  • Replace the display of the image information box

    I want to insert a mouse over the image in my project. I think I'm on the right track... Insert > HTML > forms > Image button (Ok maybe the picture button is not on the right track, but it's a start). I get a box of information indicating:
    Replace "C:\Projects\IQS\Wizard png.png icon?

    Why does do this and what is the right answer or not?

    Hi Renee

    When you see a message asking if you want to overwrite, RoboHelp is usually announcing that you bring another copy of the image that has the same file name. If it's the same picture, no harm done. Allow it to move forward. But if the image is different, you can give it a second look.

    See you soon... Rick

Maybe you are looking for

  • Amazon links in Chrome but not Safari

    I have my own site Web built with WordPress where I provide links to Amazon.com for books that I recommend.  When I consult my book in Chrome pages, images appear and the links work fine.  In Safari, the images and links appear as small gray squares.

  • Can Excel launch an executable of Labview?

    Hi all: Can Excel launch an executable of Labview? I would like to open an Excel file, fill data in Sheet1 and then press a button on the worksheet "Sheet1" Excel. By pressing this button, it will start to run an executable of Labview. Thank you all,

  • I have an A1-810 Tablet and all of a sudden I can't download photo attached.

    When click on see I get an error message States "Sorry error problem with the file FAILED" I have yahoo mail and have no problem download on my other devices.

  • How to view a Fax

    Thank you for your information about how to add a file to a fax.  As a result, my original question regarded mainly how display a fax in Windows XP MCH edition when an error message appears after you click display in the Fax Console by saying: "no de

  • Impossible to play a sound in the CAR Flash Media Player when it is connected.

    Original title: RCA TH102 256 MB Flash Media Player I can't get my computer to play sounds.  He won't play the sound of the computer or my Altec Lansing computer speakers.  The computer program to solve a problem, says that everything works and even