Many users has through the years ask for a search possibility for images used in catalogue production.. our answer has often been that it can take a while, searching through thousand of foldes and thousand of images. Very often, the data itself does not contains the full file name for image or the file path.
The solution we have created for you, are a pre-script that starts the search on a top-level folder and a data column where the search info can be found. Both these information are passed to the script in a parentheses, after the prescript name.. The pre-script can be downloaded from here..
Macintosh HD:path to were the script reside:PrescriptFindImagesInFolderHierarki.jsx(myImageDisk:images:,searchField)
C:\path to were the script reside\PrescriptFindImagesInFolderHierarki.jsx(D:\images\,searchField)
The image path in the Project settings should be left empty.
This is how the script works
The Pre-script will be executed, when you press the Create, Update or AutoCalc buttons, in Cacidi Extreme, og the first time you drag an item to the page with Cacidi LiveMerge.
When the process starts, we start a single search for all images in the start path with the file type of jpg, png, tif, psd, pdf, eps or ai formats. Those are stored in a buffer cache, while alle lines of data are process(search for, using the search value from the data record). If the image contains the search data it will be added to a list of up to 5 images for each records.
The search results in 5 new image merge fields
After the search for images are done, the script adds 5 new merge field to the data, Image_1, Image_2, Image_3, Image_4 and Image_5. Those must be used for your design. You can use the normal way of inserting the merge marker to an image box, you need to add the [Image_1] to the link path of the Frame Settings panel
Which images will be added to the found images?
If the search data are e.g. “mango”, the five first images containing “mango” some where in the name will be added, that includes “XYzmango678.png” or “mango seen form the left.jpg”