35 Replies Latest reply on Nov 21, 2018 6:09 AM by gupta.amit1981

    Auto Link in InDesign

    gupta.amit1981 Level 1

      Hi Experts,

      I need a script which needs automatically place as inline image wherever specific text as XX.eps, XX.ai, come in the document. I have exactly environment as below link. Although, this is a paid script but didn't afford at my end.

      http://www.nikkimgroup.com.au/features/placing-artwork

      I have 250+ images to link in the docs.

      Thanks very much in advance.

      Amit

        • 1. Re: Auto Link in InDesign
          S Hopkins Adobe Community Professional

          Here is a simple AppleScript that can get you started. Note that the regular expression (grep) only allows regular characters and an underscore. Spaces or special characters will require a more robust expression.

           

          --simple regEx expression will not work if spaces, hyphens or special characters allowed in filenames

          set findStr to "\\b([A-Za-z0-9_]+\\.ai|[0-9A-Za-z_]+\\.eps)\\b"

          --define path to folder of graphics

          set fileDest to path to desktop from user domain as string

          set folderDest to fileDest & "graphics"

          tell application "Adobe InDesign CC 2018"

            --simple fine grep

            set find grep preferences to nothing

            set find what of find grep preferences to findStr

            --define find change grep options here

            tell find change grep options

            set include hidden layers to true

            set include locked layers for find to true

            end tell

            set docRef to document 1

            set theStory to story 1 of docRef

            tell theStory

            set foundList to find grep

            end tell

            set testList to {}

            if length of foundList > 0 then

            set find grep preferences to nothing

            set testList to {}

            with timeout of 300 seconds

            repeat with i from length of foundList to 1 by -1

            set thisItem to item i of foundList

            try

            set filePath to (folderDest & ":" & contents of thisItem)

            set fileRef to filePath as alias

            tell insertion point 1 of thisItem

            place fileRef

            end tell

            on error

            set end of testList to filePath

            end try

            end repeat

            end timeout

            --return to default

            set find grep preferences to nothing

            end if

          end tell

          {foundList, testList}

          • 2. Re: Auto Link in InDesign
            gupta.amit1981 Level 1

            Hi Hopkins,

             

            Thanks for your reply and sorry to late reply from my side due to on vacation.

             

            This script is not working, I tell you every process which I followed:

            1. Copy the script and paste in to script editor and place on script panel in InDesign. As well as change the file extension in the script.
            2. Place reference text in InDesign document as screenshot attached.
            3. All related images keep on Desktop.
            4. Then run the script and didn't happen anything.

             

            Please suggest what need to be done or missing anything.

             

            Thanks in advance.

            Screen Shot 2018-10-31 at 5.22.38 PM.pngScreen Shot 2018-10-31 at 5.22.26 PM.png

            • 3. Re: Auto Link in InDesign
              Manan Joshi Adobe Community Professional

              Hi Amit,

               

              I have not tried the AppleScript given by Hopkins, but mentioned below is my take on the problem using Javascript.

              function findAndReplace(foldername)
              {
                   app.findGrepPreferences.findWhat = "\\b([A-Za-z0-9_]+\\.ai|[0-9A-Za-z_]+\\.eps)\\b"
                   var nameList = app.activeDocument.findGrep(true)
                   for(var i = nameList.length - 1; i >= 0; i--)
                   {
                        nameList[i].insertionPoints.itemByRange(0, nameList[i].insertionPoints.length - 1).place(foldername + "/" + nameList[i].contents)
                   }
                   app.findGrepPreferences = NothingEnum.nothing; 
              }
              

               

              This method wants an argument that is the path of the folder from where it needs to pick up the image files to place. Give it a try and let me know how it goes.

               

              -Manan

              • 4. Re: Auto Link in InDesign
                S Hopkins Adobe Community Professional

                First, don't change the filename extension (leave it as .scpt). [Note: The format you choose when you save the script determines the file extension--you should not have to "change" the extension. Saving it as "text" gives it the .applescript extension.] Second, the script is expecting a folder named graphics on the Desktop that contains the files. Third, try running the script from the Script Editor. That way you can test values for variables at the bottom of the script to see what is happening. For instance put the variable foundList at the bottom of the script. If foundList is an empty list, then the regular expression needs to be fixed (the expression I gave you is looking for .png and .jpg files). Try the one that Manan gave you to get .ai and .eps files.

                Shirley

                • 5. Re: Auto Link in InDesign
                  gupta.amit1981 Level 1

                  Hi Manan,

                   

                  Sorry for late reply and thanks to your response.

                   

                  Please suggest the path (as well as provide the syntax) because nothing will happen.

                   

                  Thanks,

                  Amit

                  • 6. Re: Auto Link in InDesign
                    gupta.amit1981 Level 1

                    Hi Shirley,

                     

                    Thanks for your reply. I have done as per your instruction that run from the script editor, nothing will happen.

                     

                    And having some result at the bottom as shown below.

                     

                    Screen Shot 2018-11-06 at 5.14.42 PM.png

                    • 7. Re: Auto Link in InDesign
                      Manan Joshi Adobe Community Professional

                      Hi Amit,

                       

                      Could you please be specific on what you did and what results did you see. I am hoping that you know how to execute Javascript in InDesign. You could use ExtendScript Toolkit to run the code. The prerequisites for the code to run successfully would be an open document with some story containing the name of the images with extension .ai and .eps. Also you need to add the code to call the method i gave, by specifying the argument of the path of the folder where the images to be placed are present. Something like below

                      findAndReplace("Path to your folder containing the images to place")

                      Also make sure that the folder does contain the image with the name that is the same as the text in the document.

                       

                      -Manan

                      • 8. Re: Auto Link in InDesign
                        gupta.amit1981 Level 1

                        Hi Manan,

                         

                        Thank you for your reply.

                         

                        Yes, I know how to execute the JS file because I have many script to short my work.

                         

                        The Process which I follow as under:

                        1. copy all text from your script and paste into the extendScript and save the file on respective script folder,

                        2. put the folder location on line 1 and replace .ai and .eps to jpg and png.

                        script.png

                         

                        3. run the script and found the error as attached screenshot.

                         

                        Screen Shot 2018-11-12 at 3.54.05 PM.png

                         

                        4. file location as attached screenshot.

                         

                        desktop.png

                         

                        Please help and let me know if I missed anything.

                         

                        Regards,

                        Amit

                        • 9. Re: Auto Link in InDesign
                          Manan Joshi Adobe Community Professional

                          The code is wrong typed, you are never calling the method and also in place of an argument you are sending in a string constant. In order to fix this copy the code i wrote as it is and then at the last add the following line,

                          findAndReplace("~/Desktop/test")

                          So the code i gave before is the function definition which describes what the function does, and this line i mentioned above calls this function with an argument. Try this and let me know what you get.

                           

                          -Manan

                          • 10. Re: Auto Link in InDesign
                            S Hopkins Adobe Community Professional

                            Hi again,

                             

                            In response to your query that shows a screen shot of the Result in the AppleScript editor window.

                            This shows us two things:

                            1. The GREP is working, it found two text references:

                            characters 1 to character 5 of the story, and text from character 7 to character 11.

                            2. Placing the file is failing, it failed with two files:

                            files A.png and A.jpg in the graphics folder on the user's desktop.

                            If the files are not in a folder named "graphics" on your desktop, then you have a problem.

                             

                            Here is a little test you can do to determine the problem. Put the following in a new script for the AppleScript Editor. Paste in the following:

                             

                            set fileName to "A.jpg"

                            set userDesktop to path to desktop from user domain as string

                            set userFolder to "graphics"

                            set folderPath to userDesktop & userFolder

                            set filePath to folderPath & ":" & fileName

                            tell application "Adobe InDesign CC 2018"

                              tell page 1 of document 1

                              place file filePath

                              end tell

                            end tell

                             

                            Run it and check the result window. If it says the file can't be found, make sure the folder is named with a lower-case g and the file is in the folder--and the folder is on your desktop. If your files are elsewhere, you need to change the location in the script. Now you know how the Result window can help you to debug a script.

                            1 person found this helpful
                            • 11. Re: Auto Link in InDesign
                              Colin Flashman Adobe Community Professional

                              Have you considered using the Place Inline Images script by Kasyan Servetsky? I believe that will do what you are after. A link to a site describing the script is here: http://www.kasyan.ho.com.ua/indesign/image/place_inline_images.html

                              • 12. Re: Auto Link in InDesign
                                gupta.amit1981 Level 1

                                Hi Manan,

                                 

                                Thanks for your help.

                                 

                                I have copied your text and put on 1st line as below:

                                Screen Shot 2018-11-20 at 4.26.46 PM.png

                                and found error as below:

                                Screen Shot 2018-11-20 at 4.26.15 PM.png

                                 

                                Please suggest.

                                 

                                Regards,

                                Amit

                                • 13. Re: Auto Link in InDesign
                                  Manan Joshi Adobe Community Professional

                                  Amit,

                                   

                                  How is this screenshot different from the screenshot you pasted before, both have the same code in the first line and also error you get is same. What i am saying is that copy the code i gave before as is without any modification, and then after that add the function call line i.e findAndReplace("~/Desktop/test")

                                   

                                  Reading a bit on method calls in JS will help you understand

                                   

                                  -Manan

                                  1 person found this helpful
                                  • 14. Re: Auto Link in InDesign
                                    gupta.amit1981 Level 1

                                    Hi S. Hopkins,

                                     

                                    Thank you very much for your reply. The script is running too good undoubtedly.

                                     

                                    As you suggested that make a folder "graphics" on the desktop.

                                    Screen Shot 2018-11-20 at 5.24.37 PM.png

                                    Previous script:

                                    --simple regEx expression will not work if spaces, hyphens or special characters allowed in filenames

                                     

                                    set findStr to "\\b([A-Za-z0-9_-]+\\.eps|[0-9A-Za-z_-]+\\.ai|[0-9A-Za-z_-]+\\.png|[0-9A-Za-z_-]+\\.jpg|[ 0-9A-Za-z_-]+\\.gif)\\b"

                                     

                                    --define path to folder of graphics

                                     

                                    set fileDest to path to desktop from user domain as string

                                     

                                    set folderDest to fileDest & "graphics"

                                     

                                    tell application "Adobe InDesign CC 2018"

                                      --simple fine grep

                                      set find grep preferences to nothing

                                      set find what of find grep preferences to findStr

                                      --define find change grep options here

                                      tell find change grep options

                                      set include hidden layers to true

                                      set include locked layers for find to true

                                      end tell

                                      set docRef to document 1

                                      set theStory to story 1 of docRef

                                      tell theStory

                                      set foundList to find grep

                                      end tell

                                      set testList to {}

                                      if length of foundList > 0 then

                                      set find grep preferences to nothing

                                      set testList to {}

                                      with timeout of 300 seconds

                                      repeat with i from length of foundList to 1 by -1

                                      set thisItem to item i of foundList

                                      try

                                      set filePath to (folderDest & ":" & contents of thisItem)

                                      set fileRef to filePath as alias

                                      tell insertion point 1 of thisItem

                                      place fileRef

                                      end tell

                                      on error

                                      set end of testList to filePath

                                      end try

                                      end repeat

                                      end timeout

                                      --return to default

                                      set find grep preferences to nothing

                                      end if

                                    end tell

                                     

                                    {foundList, testList}

                                     

                                    And the result is:

                                    {{text from character 1 to character 5 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 7 to character 11 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 13 to character 17 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 19 to character 27 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 29 to character 48 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 50 to character 71 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 73 to character 88 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 90 to character 100 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 102 to character 107 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 109 to character 120 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 145 to character 158 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 160 to character 169 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 171 to character 183 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 185 to character 194 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 196 to character 208 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 210 to character 223 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 225 to character 248 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 250 to character 259 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 261 to character 273 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 275 to character 288 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 290 to character 303 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 305 to character 328 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 330 to character 339 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 341 to character 364 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 366 to character 375 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 377 to character 391 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 393 to character 402 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 404 to character 411 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 413 to character 425 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 427 to character 433 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 435 to character 469 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 471 to character 501 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 503 to character 513 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 515 to character 524 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 526 to character 535 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 537 to character 549 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 551 to character 569 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 571 to character 575 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 577 to character 583 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 585 to character 597 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 599 to character 630 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 659 to character 680 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 682 to character 699 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 716 to character 723 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 725 to character 742 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 744 to character 761 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 763 to character 777 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 779 to character 796 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 798 to character 824 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 826 to character 837 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 839 to character 858 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 860 to character 874 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 894 to character 905 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 925 to character 937 of story id 222 of document id 2 of application "Adobe InDesign CC 2018", text from character 989 to character 1002 of story id 222 of document id 2 of application "Adobe InDesign CC 2018"}, {"Macintosh HD:Users:amitg1:Desktop:graphics:diagnosis1.eps", "Macintosh HD:Users:amitg1:Desktop:graphics:diagnosis.eps", "Macintosh HD:Users:amitg1:Desktop:graphics:diagnosis.ai", "Macintosh HD:Users:amitg1:Desktop:graphics:copy.eps"}}

                                     

                                    But some discrepancies discuss here as follow:

                                    1. Do we add the space in the syntax line [A-Za-z0-9_-]+\\.eps because of some of the images containing the same as the screenshot below.

                                    2. We want to delete the reference text after placing all the images.

                                     

                                    Please suggest 2 above queries.

                                     

                                    Really it is wonderful script to work with.

                                     

                                    Regards,

                                    Amit

                                     

                                    Screen Shot 2018-11-20 at 5.21.42 PM.png

                                     

                                     

                                     

                                     

                                     

                                    • 15. Re: Auto Link in InDesign
                                      gupta.amit1981 Level 1

                                      Hi Manan,

                                       

                                      Thanks for your reply.

                                       

                                      I have copied the text in 1st line function findAndReplace("~/Desktop/test") and the error showed.

                                      Screen Shot 2018-11-20 at 5.59.59 PM.png

                                      Then replaced above text with findAndReplace("~/Desktop/test") and the error showed differently.

                                      Screen Shot 2018-11-20 at 6.00.10 PM.png

                                       

                                      can you please help me out here step by step, if possible. It really a help me a lot.

                                       

                                      Regards,

                                      Amit

                                      • 16. Re: Auto Link in InDesign
                                        Manan Joshi Adobe Community Professional

                                        This is getting really confusing, seems i am creating more confusion then clarity. Lets start over, create a new script and paste the following and run. Then tell what happens

                                        function findAndReplace(foldername) 
                                        { 
                                            app.findGrepPreferences.findWhat = "\\b([A-Za-z0-9_]+\\.ai|[0-9A-Za-z_]+\\.eps)\\b" 
                                            var nameList = app.activeDocument.findGrep(true) 
                                            for(var i = nameList.length - 1; i >= 0; i--) 
                                            { 
                                                  nameList[i].insertionPoints.itemByRange(0, nameList[i].insertionPoints.length - 1).place(foldername + "/" + nameList[i].contents) 
                                            } 
                                            app.findGrepPreferences = NothingEnum.nothing; 
                                        }
                                        findAndReplace("~/Desktop/test")
                                        

                                        -Manan

                                        • 17. Re: Auto Link in InDesign
                                          gupta.amit1981 Level 1

                                          Thanks Colin for your response.

                                           

                                          I have tried this script on InDesign CC2018 but did not happen anything after triggered the script.

                                           

                                          Amit

                                          • 18. Re: Auto Link in InDesign
                                            gupta.amit1981 Level 1

                                            Hi Manan,

                                             

                                            Here is the snapshot of error:

                                            Screen Shot 2018-11-20 at 6.14.53 PM.png

                                            • 19. Re: Auto Link in InDesign
                                              Manan Joshi Adobe Community Professional

                                              Change the line no 7 to the following and then try

                                              nameList[i].insertionPoints.itemByRange(0, nameList[i].insertionPoints.length - 1).place(File(foldername + "/" + nameList[i].contents))

                                              • 21. Re: Auto Link in InDesign
                                                Manan Joshi Adobe Community Professional

                                                Check if the file is present at the location or not? The error specifies the location at which the script is looking for female.eps file

                                                • 22. Re: Auto Link in InDesign
                                                  gupta.amit1981 Level 1

                                                  only replaced female.eps as screenshot.

                                                   

                                                  Screen Shot 2018-11-20 at 6.36.13 PM.png

                                                   

                                                  rest of the images as is.

                                                  • 23. Re: Auto Link in InDesign
                                                    Manan Joshi Adobe Community Professional

                                                    Is this the result of my code, send me the document and i will have a look at it.

                                                    • 24. Re: Auto Link in InDesign
                                                      [Jongware] Most Valuable Participant

                                                      https://forums.adobe.com/people/Manan+Joshi  wrote

                                                       

                                                      This is getting really confusing, seems i am creating more confusion then clarity.

                                                       

                                                      No worries there, it isn't you.

                                                      • 26. Re: Auto Link in InDesign
                                                        Manan Joshi Adobe Community Professional

                                                        Works for me, have a look at the following GIF

                                                        Image_Replace.gif

                                                        P.S. :- Ignore the prompt that is something not related.

                                                         

                                                        -Manan

                                                        • 27. Re: Auto Link in InDesign
                                                          gupta.amit1981 Level 1

                                                          Hi Manan,

                                                           

                                                          I am working with CC2018, is there problem with InDesign version?

                                                           

                                                          I am enclosed the screenshot attached again what is happened here.

                                                           

                                                          Triggered the script then show the error.

                                                          Screen Shot 2018-11-20 at 7.28.14 PM.png

                                                           

                                                          Then placed the irrespective images

                                                          Screen Shot 2018-11-20 at 7.28.32 PM.png

                                                          What is the behind the reason, its work with you perfectly, not mine.

                                                          • 28. Re: Auto Link in InDesign
                                                            Manan Joshi Adobe Community Professional

                                                            Change the line no 5 with for loop with the following and then try

                                                            for(var i = 0; i < nameList.length; i++)
                                                            
                                                            1 person found this helpful
                                                            • 29. Re: Auto Link in InDesign
                                                              gupta.amit1981 Level 1

                                                              Now, its replaced all the text with the  below images

                                                              adult.eps

                                                              cc.eps

                                                              female.eps

                                                              male.eps

                                                              maternity.eps

                                                              mcc.eps

                                                              newborn.eps

                                                              p.eps

                                                              pdx.eps

                                                               

                                                              But when I placed whole image list containing with _ - space, it shows the error.

                                                              Screen Shot 2018-11-20 at 7.57.03 PM.png

                                                              • 30. Re: Auto Link in InDesign
                                                                gupta.amit1981 Level 1

                                                                Hi Manan,

                                                                 

                                                                You are very close to resolving this problem if there is no issue with the file naming.

                                                                 

                                                                You are really a very helpful guy, appreciated!!

                                                                 

                                                                Please put some effort on this, I hope we will get the positive result.

                                                                 

                                                                Regards,

                                                                Amit

                                                                • 31. Re: Auto Link in InDesign
                                                                  Manan Joshi Adobe Community Professional

                                                                  If i understand correctly you want to include names that can contain space and - as well, for that you will have to change the grep expression. Change it to the following

                                                                  "\\b([A-Za-z0-9_ \\-]+\\.ai|[0-9A-Za-z_ \\-]+\\.eps)\\b"

                                                                  1 person found this helpful
                                                                  • 32. Re: Auto Link in InDesign
                                                                    gupta.amit1981 Level 1

                                                                    Hi Manan,

                                                                     

                                                                    Hurrayy!!

                                                                     

                                                                    Thank you very much!! You rock mate!!

                                                                     

                                                                    I don't have enough words to appreciate your extremely help.

                                                                     

                                                                    Now, I can say that there is someone to help us!!

                                                                     

                                                                    Regards,

                                                                    Amit

                                                                    • 33. Re: Auto Link in InDesign
                                                                      gupta.amit1981 Level 1

                                                                      Mate,

                                                                       

                                                                      Moreover, one last thing that I have much graphics with different format i.e., ai, eps, psd, jpg, png, gif, tif, etc. I have add them and change the format of the file as snapshot.

                                                                       

                                                                      Screen Shot 2018-11-21 at 1.39.01 PM.png

                                                                       

                                                                      Is it possible to give them in a single line code??

                                                                       

                                                                      Please suggest.

                                                                       

                                                                      Amit

                                                                      • 34. Re: Auto Link in InDesign
                                                                        Manan Joshi Adobe Community Professional

                                                                        Try the following regex, it will cater to all the extensions that you mentioned and is a lot shorter than the one in use currently

                                                                        "\\b([A-Za-z0-9_ \\-]+\\.(?:ai|eps|psd|jpg|png|gif|tif))\\b"

                                                                        1 person found this helpful
                                                                        • 35. Re: Auto Link in InDesign
                                                                          gupta.amit1981 Level 1

                                                                          Thank you, Manan.

                                                                           

                                                                          It works flawlessly. Undoubtedly you are rock mate.

                                                                           

                                                                          Thanks again for this tremendous script.

                                                                           

                                                                          Now there is no question regarding this topic. It is obviously close now.

                                                                           

                                                                          Regards,

                                                                          Amit