|
Scripting |
Top Previous Next |
|
Open the Scripting panel to get access to a very powerful feature of the Downloader: Scripting. You have the option to run 3 types of scripts: pre-processing scripts, post-processing scripts and one or more handler scripts.
They differ in the moment they will be executed by the download engine:
Pre-processing script
If you want to run a pre-processing script, mark the check box Run pre processing script. Open the drop-down and select the option Select script file... By default the Downloader uses the file extension .idscript for Pre- and Post processing scripts.
You can edit the script itself by clicking on the button to the right of the drop-down (marked red in the image above). If your script file expects parameters, enter them by click on the right-most button. In that dialog you simply add parameter name and value:
Post Processing script
Similar to the pre-processing script. Open the drop-down and select the option Select script file... By default the Downloader uses the file extension .idscript for Pre- and Post processing scripts. Edit the script itself by clicking on the button to the right of the drop-down and if required enter your parameter values by clicking on this button
Handler scripts
Copy handlers are especially useful when you want to do some action with the marked image(s) before the file is transferred. It could be you want a series folders to be create first or that you want to do some conversion before downloading the file. Have a look at the article Using the DNG downloader script.
If you want to use handler scripts to copy your images, activate the check box Use handler script to copy the images. The table below it will now be active. Initially one handler script will be loaded in the table and that is the { Default Copy Handler } script. If you hover with the mouse over the name, the complete filename including path will show.
To open an existing copy handler, click on the open folder button in the table. By default the file filter will be *.pch since that is the extension that IDimager uses for copy handler files.
To create a new copy handler, press the second button. This will open the script panel as shown below:
When you are finished with your script and have compiled it without any errors, you can save it to a file. When you close the script panel, the name of the newly created copy handler script will appear in the table.
If your scripts expects parameters, enter the name and values in the table that you access via the
If you want to remove a handler script from the list, you can do that by pressing this button
|