Embed Filename in IPTC field

コメント

6件のコメント

  • rmoorlag
    Hello ?,

    John Beardsworth wrote this script:

    It places the name of the file into the title field.
    Regards,

    Roelof
    0
    コメントアクション Permalink
  • rmoorlag
    Because the file from John is made for iView Media Pro i made the adjustments so You can use it in Expression Media. The file is here:

    This are the steps to folow:

    - Download the script
    - Rename the script from 'Filename to title.txt' to 'Filename to title.vbs'
    - Open Expression media and go to Menubar Scripts/Tools/Reveal Scripts folder
    - Answer yes on the question if the scripts folder my be opened.
    - Copy the downloaded file (Filename to title.vbs) into this folder
    - Close Expression Media
    - Start Expression Media again
    - Select one test image and check the Document Title field, it's empty i think
    - Open in Menubar Scripts/Filename to title
    - Check the Document Title field again, now it's filed with the name of the file

    Now you can change the name of your file, the original name is preserved.
    Regards,

    Roelof
    0
    コメントアクション Permalink
  • Dave Heap
    [quote="mtpaper" wrote:

    Is there a script with good instructions (I do not use EM2 on a regular basis, and can just barely hobble my way around with the scripts)?


    Here are some Mac scripts to do just that:
    https://docs.google.com/leaf?id=0B47XkP ... y=CPaOkpkE

    I've used Caption, but that is easily changed. Scripts explain themselves as you run them.
    0
    コメントアクション Permalink
  • roberte
    Hi,

    I modified the AppleScript to copy the filename+extension to the IPTC "Title" (Expression Media 2 "Product") field.

    -- Robert.
    on run

    -- get the list of selected ID's in front window
    set selectedItems to GetSelection()

    -- show about
    set theAnswer to AboutScript()

    -- process each item
    tell window 1 of application "Expression Media 2"
    repeat with theItem in selectedItems
    set theText to name of theItem
    if theAnswer = "Word Caps" then set theText to my word_caps(theText)
    if theText ≠ "" then set the product of theItem to theText
    end repeat
    end tell


    end run


    -- Word Caps ---------------------------------------------

    on word_caps(this_text)
    set the comparison_string to "abcdefghijklmnopqrstuvwxyz"
    set the source_string to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    set the new_text to ""
    set last_char to space
    repeat with this_char in this_text
    set x to the offset of this_char in the comparison_string
    if ((x is not 0) and (last_char = space)) then
    set the new_text to ¬
    (the new_text & character x of the source_string) as string
    else
    set the new_text to (the new_text & this_char) as string
    end if
    set last_char to this_char as text
    end repeat
    return the new_text
    end word_caps


    -- get the selected media items in an array ---------------------------------------------

    on GetSelection()
    set selectedItems to {}
    tell application "Expression Media 2"
    if catalog 1 exists then set selectedItems to the selection of catalog 1
    end tell
    if number of items in selectedItems is 0 then
    display dialog ¬
    "You need to select at least one media item in the front catalog in order to use this script." buttons {"OK"} default button ¬
    "OK" with icon note giving up after 10
    error number -128
    end if
    return selectedItems
    end GetSelection


    -- about this script ---------------------------------------------

    on AboutScript()
    display dialog ¬
    "This command puts the filename and extension in the IPTC Title field for each selected media item, using the file name (optionally converted to word caps)." buttons {"Cancel", "Normal", "Word Caps"} default button 2 with icon note
    set theAnswer to the button returned of the result
    return theAnswer
    end AboutScript
    0
    コメントアクション Permalink
  • NN121288UL
    This is a great Script Robert.

    I'm looking for a solution to put the filename into the Expressions Media "Title" field.

    This is the field my wed system uses to title images i upload to my website. I have no idea where to begin with modifing this apple script?!? Can you help?

    THis would provide a fantastic workflow for those of us using non photo shelter image distribution.

    Best.

    Dan.
    0
    コメントアクション Permalink
  • Dave Heap
    [quote="NN121288UL" wrote:
    This is a great Script Robert.

    Actually, I wrote the script. Robert modified my script to change the word "caption" to "product" to more appropriately suit the original poster's requirements. Thanks Robert.
    [quote="NN121288UL" wrote:
    I'm looking for a solution to put the filename into the Expressions Media "Title" field.

    This is the field my wed system uses to title images i upload to my website. I have no idea where to begin with modifing this apple script?!? Can you help?
    Dan.

    All you need to do is change the word "product" in the script to"headline".
    0
    コメントアクション Permalink

サインインしてコメントを残してください。