0 Replies Latest reply on May 16, 2012 11:21 PM by maxr2012

    Help with applescript to extract Metadata

    maxr2012

      I have been trying to extract Custom metadata from a Photoshop file with some succes with the following script.

      But when I get to the last string "Usage" I don't get anything I see the info burried in the rdf:Bag.

      I will also add this below it is the metadata viewed using a text editor.

      I want the string to reurn all the elements in the Bag.

      i.e. (Select)

      Online

      Brochure

      Print

      Outdoor

      Other

      If anyone could give me some help taht would be great.

       

      tell application "Adobe InDesign CS5.5"

          tell document 1

              tell links

                  set InhouseClient to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "Client"

                  set InhouseJobNumber to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "JobNumber"

                  set InhouseCampaign to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "Campaign"

                  set InhouseTerritory to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "Territory"

                  set InhouseOtherTerritory to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "OtherTerritory"

                  set InhouseSource to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "Source"

                  set InhouseLicenceType to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "LicenceType"

                  set InhousePurchaseDate to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "PurchaseDate"

                  set InhouseEndDate to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "EndDate"

                  set InhouseDuration to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "Duration"

                  set InhouseQuantity to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "Quantity"

                  set InhouseSize to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "Size"

                  set InhouseOtherUsage to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "OtherUsage"

                  set InhouseReleaseInfo to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "ReleaseInfo"

                  set InhouseProductionNotes to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "ProductionNotes"

                  set InhouseRetouchersNotes to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "RetouchersNotes"

                  set InhouseUsage to get property link xmp namespace "http://ns.Inhouse.com/Inhouse" path "Usage"

              end tell

          end tell

      end tell

       

       

       


      </rdf:Description>

      <rdf:Description rdf:about=""

      xmlns:Inhouse="http://ns.Inhouse.com/Inhouse">

      <Inhouse:LicenceType>Rights Managed</Inhouse:LicenceType>

      <Inhouse:Client>Amex</Inhouse:Client>

      <Inhouse:JobNumber>AAA</Inhouse:JobNumber>

      <Inhouse:Campaign>BBB</Inhouse:Campaign>

      <Inhouse:PurchaseDate>2222-02-02</Inhouse:PurchaseDate>

      <Inhouse:OtherTerritory>CCC</Inhouse:OtherTerritory>

      <Inhouse:Duration>24 months</Inhouse:Duration>

      <Inhouse:EndDate>3333-03-03</Inhouse:EndDate>

      <Inhouse:OtherUsage/>

      <Inhouse:Territory>Other</Inhouse:Territory>

      <Inhouse:Source>Getty</Inhouse:Source>

      <Inhouse:Quantity>1234</Inhouse:Quantity>

      <Inhouse:Size>Full Page</Inhouse:Size>

      <Inhouse:ReleaseInfo>FFFF</Inhouse:ReleaseInfo>

      <Inhouse:ProductionNotes>GGGG</Inhouse:ProductionNotes>

      <Inhouse:RetouchersNotes>HHHH</Inhouse:RetouchersNotes>

      <Inhouse:Usage>

      <rdf:Bag>

      <rdf:li>(Select)</rdf:li>

      <rdf:li>Online</rdf:li>

      <rdf:li>Brochure</rdf:li>

      <rdf:li>Print</rdf:li>

      <rdf:li>Outdoor</rdf:li>

      <rdf:li>Other</rdf:li>

      </rdf:Bag>

      </Inhouse:Usage>

      </rdf:Description>

         </rdf:RDF>

      </x:xmpmeta>