RE: Scripting XMP Metadata in Photoshop
RE: Scripting XMP Metadata in Photoshop
- Subject: RE: Scripting XMP Metadata in Photoshop
- From: email@hidden
- Date: Thu, 28 Apr 2011 20:30:45 +0000
- Sensitivity: Normal
> Hi, do any of you guys know if it's possible to write a script that
> exports the XMP metadata from an open (Photoshop CS5) image as a
> Metadata Template (duplicating the "Export…" function in the
> "Description" tab of the "File>File Info…" menu)? We have a client
> that often asks us to composite several images into one image but
> wants the metadata of all of them combined as well. It's possible
> to do it manually by exporting/importing the metadata but I was
> wondering if a script could do it.
Hi Garry,
Could you just store the appropriate xmp data inside a script and then
write that data to the photoshop document later? Maybe the following
might give you some further ideas (this script would need to be saved
as an application so the 'property' would store the latest data after
the "Store XMP in Script" button was pressed).
property xmpInfo : {xmpAuthor:"", xmpTitle:""}
if (display dialog "Please press appropriate button..." buttons {"Store XMP in Script", "Store Script XMP in PS File"})'s button returned is "Store XMP in Script" then
getXMP()
else
storeXMP()
end if
on getXMP()
tell application "Adobe Photoshop CS5"
tell document 1
tell info
set xmpInfo's xmpAuthor to (it's author)
set xmpInfo's xmpTitle to (it's title)
end tell
end tell
end tell
end getXMP
on storeXMP()
tell application "Adobe Photoshop CS5"
tell document 1
tell info
set author to xmpInfo's xmpAuthor
set title to xmpInfo's xmpTitle
end tell
end tell
end tell
end storeXMP
--
Hope this helps.
Jay
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden