in

Quark Forums

rename images

Last post 01-19-2010 7:37 AM by prabu. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 05-27-2009 11:07 PM

    • rajeev
    • Top 75 Contributor
    • Joined on 09-29-2004
    • Bangalore
    • Posts 154

    rename images

     Dear All,

    After a long time I back in this forum. I don't have mac & Quark with me. If some one is having some time then please look into it.

     One of my collegue is asking for one script for Qaurk 6.5, and that is re-linking of images.

    They are having a many number of images in the document, and now they have renamed all the images and they want to re-link thoses images in on click.

    They are having one mapping file called imagemap.txt. In that file is like below.

    ------------------------------------ 

    Old Name    New Name

     -----------------------------------

    They want to update the link with new name by refering this file.

     

    Regards,

    Rajeev 

    With Best Regards,
    Rajeev Kumar
  • 05-28-2009 2:00 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: rename images

     Do the renamed images have the same path as the old ones?

     You can't actually relink, you would have to re-import, wouldn't you? Anyone else?

    Should be doable. For a starter, this script generates a list of image names:

    Open this script in a new Script Editor window.

    set picList to {}

    tell application "QuarkXPress"
         tell document 1
              set theRecord to file path of every image
              set numOfPics to length of theRecord
         end tell
    end tell

    repeat with i from 1 to numOfPics
         set thePic to (item i of theRecord) as text
         set picName to NameFromPath(thePic)
         if picName is not "null" then
              set picList to picList & NameFromPath(thePic)
         end if
    end repeat



    on NameFromPath(theImagePath)
         set theOffset to the offset of ":" in (the reverse of every character of theImagePath) as string
         set theImageName to (characters -(theOffset - 1) thru -1 of theImagePath) as string
         return theImageName
    end NameFromPath

    picList 

     I'm probably too busy to take it farther, but this should get you going!

  • 10-26-2009 11:42 PM In reply to

    • prabu
    • Top 150 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    Re: rename images

     Hi Emma

     Ur script is working fine. The renamed images have the same path as the old ones.

      As you told, re-link can't be possible. 

    Could you please suggest me the scripting for re-import..?

     Thanks

    Prabu

     

    Regards
    Prabu
  • 10-26-2009 11:46 PM In reply to

    • prabu
    • Top 150 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    Re: rename images

     Hi Rajeev

    Am also working for the same task. Have you got the solution for this? Could you please suggest me how to do this?

     

    Regards
    Prabu
  • 10-27-2009 10:20 AM In reply to

    Re: rename images

     Not all images can be re-imported like this.

    The trick here is to get all the properties of an image (scale, offset, skew, etc.) then import the replacing image and then re-applying the properties.

    Some properties however do not allow do be set via AppleScript. Clipping Mask for example is one of them.

    So I suggest you do your own tests by copying and re-applying all non-r/o properties for each images.

    HTH

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

  • 10-28-2009 11:18 PM In reply to

    • prabu
    • Top 150 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    Re: rename images

     Thanks Scripting_Ace.

     As per your suggestion, it's working fine now.

    Regards
    Prabu
  • 10-30-2009 10:51 PM In reply to

    • prabu
    • Top 150 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    Re: rename images

     Dear Rajeev

      I have a solution for your above mentioned problem.

    If you need, i will give my script.

     Regards

    Prabu

     

     

    Regards
    Prabu
  • 12-22-2009 8:50 PM In reply to

    Re: rename images

    Hello Prabu,

     I try to contact you through email but it did not go through. So I try to post the message here hope you can help. I am working on a project that require the same script that you describe above. Could you please share the script to me? Thanks you very much in advance for your help. Thanks. 

    Kenn

  • 01-19-2010 7:37 AM In reply to

    • prabu
    • Top 150 Contributor
    • Joined on 06-04-2009
    • Chennai
    • Posts 64

    Re: rename images

     Hi Kenn

     Sorry for the late. For a long time, i was busy with another project.

    Tell me now how can i help you?

    Regards
    Prabu
Page 1 of 1 (9 items)
Powered by Community Server (Commercial Edition), by Telligent Systems