Bridge CS2: Scripting metadata w/o XMPScript?

Hi,
I need to get at strcutured data types (bag and alt) and I can't figure out how to do this in CS2, or if it's even possible. I've looked at the sample code in the scripting guide, but it doesn't seem to be of use. Here's what I've tried so far to get the first element in the alt structure xmpRights:UsageTerms field (labeled x-default):
var tn = new Thumbnail(fileName);
var md = tn.synchronousMetadata;
md.namespace = "http://ns.adobe.com/xap/1.0/rights/";
var rights = md.UsageTerms;
Window.alert(rights["UsageTerms/xmpRights:x-default"]);
Any suggestions?

John,
I think you are misunderstanding two things about the Bridge Metadata object and XMP.
First, the Metadata object will return only Strings, not objects that represent nodes in the XMP data model.
Second, the xpath syntax you are trying to use to access the x-default member of the array is incorrect.
Try a script like the following:
#target bridge
var thumb = app.document.selections[0];
var md = thumb.synchronousMetadata;
try {
md.namespace = "http://ns.adobe.com/xap/1.0/rights/";
var usageTerms = md["UsageTerms[@xml:lang='x-default']"];
$.writeln( usageTerms );
md["UsageTerms[@xml:lang='x-default']"] = "Changed";
} catch( e ) {
$.writeln( e );
This may be a usable workaround for you if you need to deploy scripts that run on CS2 and cannot use XMPScript.
If you can I recommend using CS3 to develop the scripts for CS2 because it has some tools that may make your job easier. First, you can use utiltiy functions in XMPScript like XMPUtils.composeLanguageSelector() to create well-formed xpaths to use in your CS2 scripts. Second in Bridge CS3 exceptions thrown by the XMP toolkit when the Metadata object tries to get a property (ex: when a script calls var foo = md["bogus/xpath"]) will be reflected as JavaScript exceptions with the error message from the internal C++ exception. If, for example, the property name or namespace URI are bad, it's now much easier for the script writer to determine what is wrong than it was in CS2. This is one of my favorite, unsung new features in CS3.
-David

Similar Messages

  • Xap rating metadata lightroom bridge cs2

    Is there anyone out there who can tell me why the xap metadata is written so differently in lightroom jpegs as compared to bridge CS2?
    I've had writtena feature on my dynamic gallery on my website that reads the xap rating in bridge-produced jpegs, but doesn't work with lightroom produced ones. When I read the metadata from the 2, the structure was totally different. I dont suppose anyone from the development team would care to tell us how lightroom and bridge CS2 read the different xap structures - it would give me a clue how to re-write the function on my website.
    Also are there plans to make the current structure standard? Does bridge CS3 for instance produce jpegs with the same structure in the metadata?
    Thanks!

    Yup, Bridge is just a Browser. ACR and Photoshop do the work.
    AFFAIK.
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.10 & Win XP, Pentax *ist D
    See LR Links list at my
    Blog for related sites.

  • CS2 Scripting DOM

    I got this scripting DOM for CS3 translated from xslt to .chm file by Jongware which is very helpful. But is there anybody out there who has this scripting DOM for CS2? 'Coz that will help us (beginners) a lot.

    John,
    I think you are misunderstanding two things about the Bridge Metadata object and XMP.
    First, the Metadata object will return only Strings, not objects that represent nodes in the XMP data model.
    Second, the xpath syntax you are trying to use to access the x-default member of the array is incorrect.
    Try a script like the following:
    #target bridge
    var thumb = app.document.selections[0];
    var md = thumb.synchronousMetadata;
    try {
    md.namespace = "http://ns.adobe.com/xap/1.0/rights/";
    var usageTerms = md["UsageTerms[@xml:lang='x-default']"];
    $.writeln( usageTerms );
    md["UsageTerms[@xml:lang='x-default']"] = "Changed";
    } catch( e ) {
    $.writeln( e );
    This may be a usable workaround for you if you need to deploy scripts that run on CS2 and cannot use XMPScript.
    If you can I recommend using CS3 to develop the scripts for CS2 because it has some tools that may make your job easier. First, you can use utiltiy functions in XMPScript like XMPUtils.composeLanguageSelector() to create well-formed xpaths to use in your CS2 scripts. Second in Bridge CS3 exceptions thrown by the XMP toolkit when the Metadata object tries to get a property (ex: when a script calls var foo = md["bogus/xpath"]) will be reflected as JavaScript exceptions with the error message from the internal C++ exception. If, for example, the property name or namespace URI are bad, it's now much easier for the script writer to determine what is wrong than it was in CS2. This is one of my favorite, unsung new features in CS3.
    -David

  • LR adjustments not showing up in Bridge CS2

    When working with .DNG files in LR, it seems that Develop settings show up in Bridge CS3 (beta), but only some show up in Bridge CS2; the same is true for metadata, but only sometimes -- keywords tend to show up, Location, City, etc. don't. Using the "Export XMP Metadata to File" doesn't seem to make a difference.
    For example: if I adjust the contrast, then export xmp, I can see the difference in Bridge CS3, but not CS2. But if I change the white balance, the change shows up in both versions of Bridge.
    Any thoughts?
    Thanks,
    Martin

    Brilliant, Geoff! I had downloaded ACR 3.7 for the DNG converter, but apparently hadn't installed it for Bridge/Photoshop CS2, which were still using 3.6. I used "updates" in the Help menu, and 3.7 was installed automatically. All of the LR adjustments now show up in Bridge CS2.
    Thanks!
    Martin

  • Bridge CS2 InDesign Contact Sheets

    I create Contact Sheets in InDesign through Bridge (CS2) for EPS files many times a day. To get the EPS files to import to the contact sheet I have to add the file type to the File Type Filter (under Files...) every time I create a contact sheet. Is there a way of changing the script so that the EPS files will automatically be included in the File Type Filter? I have no experience with scripting and am having a hard time finding information on this topic.
    Thanks for any help you can offer!
    Melissa

    Melissa,
    Open up AdobeScriptLibrary1.jsx in a text editor (Adobe's ESTK is a great one for editing scripts).
    Look at around line 368 or search for:
    TYPES.DEFAULT_CONTACTSHEET
    you should see a line like:
    TYPES.DEFAULT_CONTACTSHEET = "JPG,JPEG,TIF,TIFF,GIF,AI,PSD,PDF,";
    Just add eps, epsf to the list.
    TYPES.DEFAULT_CONTACTSHEET = "JPG,JPEG,TIF,TIFF,GIF,AI,PSD,PDF,EPS,EPSF";
    Then restart bridge.
    That will do it for you.
    Bob

  • CS2 + Bridge CS2 1.0.4.6 (104504) white thumbnails

    Bridge CS2 displays only white thumbnails in all folders. Initial Desktop images show fine, but when changing to folders, all thumbnails are white boxes. Including when I go back to the Desktop - all thumbnails are white. Close Bridge and reopen and the Desktop thumbnails are fine again. Go to Folders, they're all white.
    I have uninstalled and reinstalled, purged cache, tried everything I can find to get the thumbnails to display correctly - as they originally did. Sometime during an update things went bad.
    Anyone have a solution please. isearched the forum and came up with nothing. I just can't stand going to the file open dialog box to open files instead of using Bridge as I have always done.
    Thanks.

    [email protected] wrote:
    > Larry
    > for us to process thousands of photos this way would take hours.
    Why? Are you talking CPU hours or staff-hours? Does your workflow require heavy
    user interaction or is something else the problem?
    -X
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • Unable to  set some dates  in Adobe bridge cs2

    HI ALL
    Our keywording team using  the  Adobe bridge CS2.
    Kindly  hep me to understand Why  some dates  Like
    1/1/1970
    1/1/1642
    1/1/1890
    etc  .....
    I unable to  set in  ITPC image Tab  information .............
    Lakhan

    Hi
    Thanks for revert ......
    I  tried   with  CS2 & CS3  but only  specific  dates like (1/1/1970) i above  mentioned  is still  not   reflecting in IPTC image  info   ........
    Please suggest....

  • Adobe Bridge (CS2) not working. Even after new installation

    Hello,
    The Problem was, that Adobe Bridge (CS2 on Windows XP) suddenly stopped the work. After several days of trying to get this program to run again, i deinstalled and installed Photoshop with all it´s programms.
    But Bridge still is not working anymore. I can visit some folders once or twice, but after 2 tries, it stopps and give no reaction.
    What is wrong with Photoshop ?
    regards

    You need to reset Bridge preferences by holding
    Ctrl+Alt+Shift while starting the program from the icon. You should get a dialog offering three choices select all of them.
    This does not happen with a re-install of the program.
    If you don't get the dialog box, keep trying till you do.

  • Displaying thumbnails in Bridge CS2

    Hello, I've organized the photos from my Canon Digital Rebel XT in Adobe Bridge CS2 (Version 1.0.4.6) for years without a problem.  I shoot in RAW and those files are approx. 7 MB in size.  I recently received a Canon T3i and the files sizes are approx. 3 times as large and I'm having trouble getting Bridge to display a thumbnail.  I can't imagine it's a file size issue since I routinely have .psd files that are 70 MB and larger that I have no trouble having Bridge display a thumbnail.  The photos from both cameras are CR2.  Is there a settings in Bridge I should adjust?
    Any other ideas why I can't get the photos from the new camera to display as thumbnails in Bridge?
    Thanks for your help :-)

    Geoffrey,
    Geoffrey Hudson wrote:
    …The photos from both cameras are CR2…
    The fact that they have the same extension is irrelevant.  The files are fundamentally different.
    The Canon T3i was supported for the first time in ACR 6.4 and later, which only run with CS5.
    There is and there will be no version of ACR that will work with Bridge CS2 to open files from the T3i.
    Your only option would be to use the free Adobe DNG Converter to convert your raw CS2 files to raw DNGs that you can then open in CS2.
    If you have an Intel Machine, you want version 6.6 of the Adobe DNG Converter.  If your machine is older than the Intel Macs, e.g. any kind of Power Mac, then you need version 6.4 of the free Adobe DNG Converter, as later versions will not run on non-Intel machines.
    Wo Tai Lao Le
    我太老了

  • Error Message when starting Bridge CS2: "create redeclared"

    I get this "create redeclared" error message on the following line of code:
    var labelMenu = MenuElement.create( "command", "Label", "at the end of Thumbnail");
    but then this function and all others work just fine afterwards. Is there a way to either fix the error or suppress this warning? It's really more of an annoyance than anything else.
    I'm using Bridge CS2 1.0.4.6

    This happens if you try to create a menu that already exists. Use MenuElement.find() to avoid re-creating a menu with the same ID.
    -David Franzen
    Adobe Bridge Quality Engineering
    Adobe Systems, Inc.

  • Bridge CS2 - files over a network

    I have been using Bridge CS2 for a while now. It is mainly used for the preview and management of RAW files. Until recently, the files have been located on the local drive (C:) and there has been no issue. However, I have recently, for security reasons, moved all of the files onto a Linux file server. Ever since then, it has been painfully slow using Bridge, infact it crashes infrequently.
    I know that the solution may seem obvious - the file transmission is being slowed by the network/server. However the network runs a gigabit LAN with a gigabit switch between the two machines. The physical location of the server is less than two meters from the workstation, and I can confirm that the LAN is infact running at 1000 (monitoring via task manager of file transfer in Explorer between two machines). Regardless, even at 100bit LAN, Bridge should still be running smoothly.
    I copy the RAW files (about 12meg each pic) onto the server, and then open Bridge and it takes about 10mins to load up about 100 files.
    I have tried clearing the cache, and running the cache on both the local and network machine, and all of the this suggested by Adobe http://kb.adobe.com/selfservice/viewContent.do?externalId=317912.
    As far as I can tell, Bridge is taking a long time to build the thumbnails. I have even tried turning off anti-virus and firewall, but there is no difference. Every other network activity takes little/no time and I need this to work smoothly. Surely I don't have to restrict to local files!
    Please help me! Do I need to change any settings? Is it normal for Bridge to take so long over a network?

    I realise that operating over a network is never faster than a local drive, however using a gigabit LAN and dedicated file server should be the closest thing to running a local drive, if not as fast as a USB2.0 drive (which runs at 480Mbps).
    I have however been able to solve the problem. I am not sure if this is an actual "fix" but I did a few things:
    1) I unmounted the network drive and remounted it using SUBST (ie "SUBST X: C:\directory\path")
    2) I cleared the cache for both Bridge and the Camera Raw ("C:\Documents and Settings\ [user] \Application Data\Adobe\Bridge" & "C:\Documents and Settings\ [user] \Application Data\Adobe\Camera Raw"); then
    3) I rebooted all machines (including the sever with "sudo shutdown -Fh now"); and finally
    4) After reopening Bridge the first time I closed it down again and cleared the cache again.
    Now it works perfectly - infact it is very close to the speed it was working with the local drive. The cache build very fast and there is no more hanging or crashes, and I am back to the old Bridge!!

  • Import Stichwörter Dateibrowser CS in Bridge CS2

    Hallo,
    auch wenn im englischen FAQ die Anleitung steht, so ist es mir doch nicht gelungen nach dieser Anleitung das Problem in der deutschen Version CS2 zu lösen.
    Also, wer kann helfen? Ich möchte die Stichwörter aus der Datei Stichwörter.psp (Dateimanager der CS Version)in Bridge CS2 Version importieren. Die automatische Konvertierung bei Neustart von Bridge (Adobe Bridge Keywords.xml vorher gelöscht) passiert so nicht.
    Danke für jeden Tipp,
    Uwe

    Exportiere doch die Stichwörter, mit den anderen Metadaten als XMP-Sidecar-File im Ordner wo die Dateien gespeichert sind. Soviel ich mich erinnern kann, ist das eine Voreinstellung im Dateibrowser, wo man einstellen kann, ob diese Daten zentral oder verteilt gespeichert werden. Ist halt schon sehr lange her Photoshop CS. Diese Sidecar-Files werden dann auch von Bridge CS2 und CS3, bzw. Lightroom eingelesen.
    Noch besser wäre es meiner Ansicht nach, die XMP-Daten in die Dateien hineinzuschreiben. Das geht aber bei PSCS noch nicht bei so vielen Dateiformaten wie das mit der aktuellen Version geht.

  • JS: Using CS2 Scripts with CS3

    We're getting ready to (finally) upgrade from InDesign CS2 to CS3. We use several scripts (Javascript) regularly. I know quite a bit changed with the object model in CS3. I've seen a couple of threads here where Olav mentions "script versioning" that allows you to reference the old object model, but I haven't been able to find HOW to do that.
    I want to upgrade all of our scripts to the CS3 model, but that will take some time, as I am no expert. Is there a way to use our CS2 scripts just as they are for now (until I'm able to get them all updated)?
    Thanks,
    Lisa

    That script won't see any styles that are in style groups in CS3 -- is that the problem?
    Or it could be that the effect of simply reasserting the style in CS3 is different from CS/CS2. I don't remember.
    Dave

  • How to place a word document in a TextFrame with InDesign CS2 scripting (JavaScript)?

    I´m newbie with InDesign CS2 Scripting (JavaScript). I need some help to understand the way to place a Word document in an indesign template, using JavaScript(.jsx).
    Thank you for the help,
    Peter

    //PlaceTextFileInFrame.jsx
    //An InDesign CS3 JavaScript
    //Places a text file in a text frame.
    var myDocument = app.documents.add();
    //Set the measurement units to points.
    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
    //Create a text frame.
    var myTextFrame = myDocument.pages.item(0).textFrames.add({geometricBounds:myGetBounds(myDocument, myDocument.pages.item(0))});
    //Place a text file in the text frame.
    //Parameters for TextFrame.place():
    //File as File object,
    //[ShowingOptions as Boolean = False]
    //You'll have to fill in your own file path.
    myTextFrame.place(File("/c/test.txt"));
    function myGetBounds(myDocument, myPage){
    var myPageWidth = myDocument.documentPreferences.pageWidth;
    var myPageHeight = myDocument.documentPreferences.pageHeight
    if(myPage.side == PageSideOptions.leftHand){
    var myX2 = myPage.marginPreferences.left;
    var myX1 = myPage.marginPreferences.right;
    else{
    var myX1 = myPage.marginPreferences.left;
    var myX2 = myPage.marginPreferences.right;
    var myY1 = myPage.marginPreferences.top;
    var myX2 = myPageWidth - myX2;
    var myY2 = myPageHeight - myPage.marginPreferences.bottom;
    return [myY1, myX1, myY2, myX2];

  • CS6 Bridge startup scripts, AGAIN!

    Had the same problem with CS5 and beta CS6, Bridge startup scripts won't load, meaning the outout pane is blank.
    Over the past 2 years, 2 different computers, 3 hd's, clean installs on all and I keep getting the same problem.
    This time, standard install on Lion 10.7.3 mac pro mid 2010 16gb RAM ssd, permissions repaired before/after install, diskwarrior run before install. Works fine on my laptop.
    Getting a bit frustrated with Adobe, same problem hasn't been sorted out in the past 2 years.
    There was a helpful post in the old CS6 forums for a cure, but surely we shouldn't have to do this Adobe, again?

    Might get a better response if you post in Bridge Script Forum  http://forums.adobe.com/community/bridge/bridge_scripting

Maybe you are looking for

  • SSO to non sap

    We are trying configure SSO to non SAP system using the IIS web filter. We were able to configure the web filter to receive the header variable authentication but the non SAP system is not recognizing it. Could any one of you share the document or th

  • No video on podcasts

    I have several video podcasts thAt play on my apple tv, but with no video. They are playing as audio only podcasts. The same videos play fine in iTunse on my iMac and on my iPad. Any idea why? bob ATV 2.0 the black hockey puck, running OS 5.1.1

  • Visited Sites do not Change Color

    Since the recent Safari upgrade, the sites I have visited do not change color.  For example, if I do a Google search, click the first link and then either use the back button or the refresh button in the Google search field, the site I just visited i

  • Netbeans 6.5 Mercurial related exception

    Hi all, I Install Mercurial 1.1.1 and NetBeans 6.5 as I look the NetBeans contain the Mercurial plugin in the Base Ide. I click to Versioning\Mercurial\Clone Other... throw an exception here is the call stack: What need I do? Can I fix this anyway? j

  • Need youtube help on macbook pro and iphone

    I can't load youtube videos on my iphone or my mac like when I I try to watch them, the videos take a long time to load and keep pausing throughout the entire video. I have a Iphone 4 current vs 5.1 and I have a macbook pro snow leopard vs 10.6.8