Display the filed instructions (that´s under IPTC Core metadata).

Hi all
I´m new on programing scripts in Photoshop..and tried everything but was not able to change the script below. Let´s explain this script is found at Adobe Photoshop default folder and works to show the Camera Model used to the current image.
Now..the challenge...I want to change the scripts so when you run the it shows a field called Instructions (that´s located in the IPTC Core XMP metadata Tab. (In Photoshop > open an Image > go to File menu > File Info option and see the IPTC Core Tab > Instruction field).
Can anyone please help me to change this lines. It could look very simple for you but it´s actually very difficult to me; This base-script is what I have and works fine to display the camera model:
try {
     var xmpString = activeDocument.xmpMetadata.rawData.toString();
     var tiffModelLength = ('<tiff:Model>').length;
     var tiffModel = xmpString.search( '<tiff:Model>' );
     var tiffModelEnd = xmpString.search( '</tiff:Model>' );
     var tiffModelStr = xmpString.substr( tiffModel + tiffModelLength, tiffModelEnd - tiffModel - tiffModelLength );
     if ( tiffModelStr.length > 0 ) {
          alert( tiffModelStr + localize ( '$$$' ) );
     // check the exif
     var exifModelStr = '';
     var exifData = activeDocument.info.exif;
     for ( var i = 0; i < exifData.length; i++ ) {
          if ( exifData[i][0] == 'Model' ) {
} // try end
catch( e ) {
// always wrap your script with try/catch blocks so you don't stop production
// remove comments below to see error for debugging
// alert( e );
Thank you a lot for any help.
Gustavo.

Here is one of X's functions that should give you the information..
#target photoshop
var xmp = activeDocument.xmpMetadata.rawData;
var Instructions = parseMetadata(xmp,"photoshop:Instructions");
alert(Instructions);
function parseMetadata(xmp, tag) {
  var re = new RegExp('<' + tag + '>(.+)</' + tag + '>');
  var m = xmp.match(re);
  if (!m) {
    re = new RegExp("<[^:]+:" + tag + ">(.+)</[^:]+:" + tag + '>');
    m = this.xmp.match(re);
  return (m ? m[1] : '');

Similar Messages

  • IPTC Core metadata fields lost with PNGs

    Hi there,
    I have a TIF file which contains data in the IPTC core fields. Converting the TIF to a JPEG will retain most of the fields and can be viewed still in Adobe Bridge.
    However, converting to a PNG will lose all of the data. The only way it seems to retain metadata is to set options on the Save to Web options in Photoshop, which doesn't really work too good with a 100mb TIF being converted.
    Resampling to PNG in ImageMagick and then reading in Bridge has the same issue, even though 8BIN and IPTC profiles are actually embedded into the file.
    Does Bridge support IPTC core metadata for PNG files?
    Many thanks!

    They've confirmed the same thing i've found, that Save For Web actually preserves a chunk of the IPTC core data, but this isn't really any good for the quality of image I need to save.
    It's strange how the XMP preserve option isn't available for a standard PNG save.

  • How do I remove an app from the update list that is under someone else's apple id?

    How do I remove an app from the update list that is under someone else's apple id? So this way the update always fails because it asks for someone else's password. I don't have the app on my mac, it only appears in the update list. It's just annoying, because the update keeps appearing, and the reminder keeps reminding me that I should install a new update.

    You installed a hacked app, originally from the Mac App Store. It contains the receipt for a different app, downloaded using an account that you don't control. You need to identify and remove the hacked app.
    Important: The app you need to remove is not necessarily the one named in the App Store alert. For example, the App Store may prompt you to update "Angry Birds" or "Twitter," but the hacked app may be something else entirely. Don't make any assumptions about which app you're looking for. To find it, you must carry out a systematic search with Spotlight.
    1. Triple-click anywhere in the line of text below on this page to select it:
    kMDItemAppStoreHasReceipt=1
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    2. In the Finder, press command-F to open a search window, or select
    File ▹ Find
    from the menu bar. In the search window, select
    Search: This Mac
    from the row of tokens below the toolbar. Below that is a popup menu of search criteria, initially showing Kind. From that menu, select
    Other...
    A sheet will drop down. In that sheet, select
    Raw Query
    as the criterion, then click OK or press return.
    Now there will be a text box to the right of the menu of search criteria. That's where you enter the raw search query. Click in that box and paste the text you copied earlier by pressing command-V.
    4. The search window will now show all the App Store products that are installed. Compare those search results with the list of your purchases from the App Store. To see the complete list, you may need to unhide hidden purchases. If any apps were download from the App Store using other Apple ID accounts that you control, sign in to the store under each of those ID's and check the purchases.
    At least one of the apps in the Spotlight search results is not among your purchases in the App Store. Move each such item to the Trash, after quitting it if it's running. You may be prompted for your administrator password. Empty the Trash.
    Quit and relaunch the App Store. Test.
    If you find these instructions confusing, ask for an alternative method.

  • Itunes on my iPhone 5 only displays the artist list with the UP NEXT feature.  How can I change the UP NEXT feature on my iPhone 5 to display the next songs that are to be played on my play list?

    Itunes on my iPhone 5 only displays the artist list with the UP NEXT feature.  How can I change the UP NEXT feature on my iPhone 5 to display the next songs that are to be played on my play list?

    Hi Sarah,
    It sounds like the songs have either not yet synced over to the iPhone, or something went wrong when attempting to sync to the iPhone. My recommendation is to uncheck the "Sync Music" checkbox.
    Once you have done that, recheck the "Sync Music" checkbox, and apply the changes once more. This will instruct iTunes to completely remove all music from your iPhone, and then copy the files once more. If you have a large amount of music, this initial sync may take a while.
    If the above does not resolve your issue, see the following articles:
    iOS: Syncing with iTunes
    http://support.apple.com/kb/HT1386
    iOS: How to transfer or sync content to your computer
    http://support.apple.com/kb/HT1296
    Thanks,
    Matt M.

  • HT5517 How do I get rid of the AirPlay instructions that are permanently on the HDTV. I wish to play music and have random photographs appear and do not want the Black AirPlay instructions on the screen

    How do I get rid of the AirPlay instructions that are permanently on the HDTV.? I wish to play music through Apple TV and have my photographs that are on my computer randomly stream but the AirPlay instructions overlay these photos.

    http://www.adobe.com/support/flashplayer/downloads.html
    http://get.adobe.com/flashplayer/
    http://www.adobe.com/products/flashplayer.html
    http://www.adobe.com/shockwave/download/flash/trigger/en/3/index.html
    https://get.adobe.com/flashplayer/otherversions/
    https://www.adobe.com/support/flash/downloads.html
    I downloaded from this adobe site. http://get.adobe.com/flashplayer/. Had a lot of issue with it. opening pages. Anyway, I have gotten rid of the extra software, inclduing Chrome.

  • How to display the table components that make up a structure?

    Hi,
    How does one display the table components that make up a structure?
    I want to see the table fields that make up the structure EKBEZ.
    Thx.
    Andy

    Hi
    GOTO SE11 , type the structure name in DataType optional feild , you will get the feilds that make the structure
    Kindly rewards the points accordignly
    Regards,
    Pranshu

  • HT1202 The manual mode to transfer music to my iTune from my iPhone does not work as described. When I click on Manually manage... it displays the warning message that all music on my iPhone will be erased and replaced by iTune music.

    The manual mode to transfer music to my iTune from my iPhone does not work as described. When I click on Manually manage... it displays the warning message that all music on my iPhone will be erased and replaced by iTune music.
    How can I transfer my music to a second computer iTune?
    Thanks,

    See this user tip
    Syncing iPhone to a "New" Computer or replacing a "crashed" Hard Drive

  • Do search engines make use of IPTC Core metadata?

    I'm using Bridge to organise a large group of maps (the maps are JPEG images), which will be published on my organisation's website. These maps are about niche topics and very specific areas of the UK.
    I'm wondering if there are any SEO benefits from adding IPTC Core metadata to these map images using Bridge? Does anyone know if search engines use the meta?
    Thanks in advance for any ideas.

    Thanks for the replies. Yes, I'm talking about whether Google etc. pay any attention to the meta in the images.
    My map images are exported from the source map application as JPEGs.
    I'm not using a batch 'Save for web' in Photoshop, as the map images aren't designed for viewing in web pages - I'm just putting the maps up on the web to quickly share them for re-use by other people.
    In Bridge, I can quickly add the basic meta (copyright notice, addresses, rights usage terms, etc.) by selecting all the JPEGs and then do the title and description individually. Just wondering if it's worth the effort?

  • How can a  variable display the first character that's on the page?

    I'm creating a telephone directory and want each page to display the alphabet of the first listing on the page on the top - only one character.
    Can you tell me how to do this?

    Hmmmmm, seems I was wrong about the GREP styles. I just tried it and they don't get picked up. I consider that a bug, but it's probably "as designed."
    That leaves you having to work with nested styles only, or Find/Change. I think what you'll need to do is redefine the Paragraph style so it has two nested styles that apply the correct style to whatever needs to be styled at the start of the paragraph, one for the first character and the second for the rest of the word(s) if you can figure out a trigger (can InData add an end nested style character or is thew some punctuation you can use?), then find/change to remove the applied character style. For that I'd serach for ^.+ with the find format set to the character style that InData applied and the chane format set to [None], which will only remove it from the beginning of your paragraphs. If this is done correctly there will be no change in appearance since the redefined paragraph style will do the formatting.
    If that won't work, you can use find/change to apply a new style to the first characters. Search for ^. and set the change format to the new character style that you'll use in the variable. It needs to have the same attributes as the style applied by InData or the appearance will change.
    The second method is probably easier since you don't need to redfine the paragraph style, but both methods require you to use find/change to alter the text, which means if more text is added you'll need to re-do the find/change. Not a big deal, but don't forget. I'd be tempted to wait until the last minute and just ignore the headers for the moment, if editing is ongoing. I'd also test this on a copy of the file for safety.

  • I can't find the help instructions that fit my problem. You said go to the help page and copy the instructions, but I don't see my particular problem listed or the solution to it. I told you I'm no genius; I totally confused.

    [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFileInputStream.init]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://1clickweather/content/js/utils/filemanager.js :: <TOP_LEVEL> :: line 233" data: no]
    This is the error message I get when I log onto my Earthlink email program and onto any website. I don't see any solution to error messages of this kind on the troubleshooting page.

    That is a fault with the 1Click Weather extension. Disable it or un-install it.

  • IPTC field codes -- Bridge IPTC Core metadata

    Is there a reference somewhere as to which IPTC codes match up with the IPTC Core fields in Bridge metadata?
    A list of the codes is here, so you know what I'm talking about. For example, the Description field in Bridge metadata corresponds to the Caption / #120 code in this list:
    http://www.fotoware.com/binaries/fsp50/userguide/28.htm
    I'm using a plug-in that writes image info from a database into the corresponding file's IPTC fields based on the IPTC code, but the names of the fields on the list of codes don't match up with what they're called in Bridge, so it's taking a lot of trial and error to figure out where things go.

    Never mind, found one. It doesn't mention Bridge specifically, but it has Photoshop and Lightroom (along with several other image-browsing apps) and both seem similar to Bridge:
    http://www.controlledvocabulary.com/imagedatabases/iptc_core_mapped.pdf

  • Script to add content to IPTC core metadata fields

    Is there the possibility that a script could be used to add data to IPTC standard fields?
    Thanks.

    They've confirmed the same thing i've found, that Save For Web actually preserves a chunk of the IPTC core data, but this isn't really any good for the quality of image I need to save.
    It's strange how the XMP preserve option isn't available for a standard PNG save.

  • HT5654 I performed the update to my iphone to get the latest version, but now it does not want to activate my phone and displays the error message that the activation server is not available. Tried itunes and no luck. help anyone

    I have an iphone 3gs of which I attempted the latest IOS pdate through itunes. Now, it shows the original start up screen and when it gets to the activiaton screen it displays an error message stating: Your iphone could not be activated because the activation server is temporarily unavailable.  Help anyone??

    "We're Sorry, Activation Server Temporarily Unavailable, contact Customer Care?"
    99.9% of the time, the cause of this issue is the fact the phone was jailbroken/hacked to unlock it for use on networks other than the network the phone was originally locked to. Apple maintains a database of officially unlocked iPhones, and when Apple's servers detect phones such as yours, activation stops & you get the message you got.
    So, you need to get a sim card from the carrier the phone was originally locked to, or get it officially unlocked, if you want to activate it. Because it appears that it was not officially unlocked.

  • After ALV Report i need to display the text below that

    Hi Experts,
    I need a help.
    I want to display a write statment after alv report is generated.pls help me.
    Please Urgent.

    here is an example
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE' 
                i_callback_html_end_of_list = 'END_OF_LIST_HTML'
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    *&      Form  end_of_list_html
          output at the end of the list - not in printed output       *
    FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
      DATA: ls_text TYPE sdydo_text_element,
            l_grid     TYPE REF TO cl_gui_alv_grid,
            f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
      ls_text = 'Footer title'.
    adds and icon (red triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'ICON_MESSAGE_ERROR_SMALL'.
    adds test (via variable)
      CALL METHOD end->add_text
        EXPORTING
          text         = ls_text
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Bold text'
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Normal text'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Yellow triangle'
          sap_emphasis = 'strong'.
    adds and icon (yellow triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'ICON_LED_YELLOW'.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'More text'.
    *set height of this section
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = l_grid.
      CALL METHOD l_grid->parent->parent->(f)
        EXPORTING
          id     = 3
          height = 14.
    ENDFORM. "end_of_list_html.

  • What is the best accessories that are under £30?

    I have £30 to spend what is the bast accessorie to get?

    Sounds to me like you don't really lack anything so you could add to your music and video collection, or you could put it  your 30 pounds in money market or what have you, wait for it to compound in value than have money to by the next version of the latest and greatest apple iPod or ipad5 (the life force) which no doubt you will be drooling and venting for when we come down the road to it.

Maybe you are looking for