[[Image:]]This rule uses Pascal/Delphi programming syntax and conventions. ReNamer comes some preloaded scripts. Let us see how to use them, and later see how to add a new script.
Using a script
- Click on the [[Image:]] button (located just below the Configuration pane). A list of scripts appears.
- [[Image:]]All available scripts are listed above the line. Click on any script to load it into the Configuration pane.
- Edit the script if required
- Press [[Image:]] button to add the script to the rule stack.
- Repeat steps 1-4 to add more script-based rules.
Borrowing scripts from forum
Even if you do not know how to write a script, you can easily use scripts written by others.
First, visit the User Forum and search for a suitable script. The Forum already has a large number of such scripts. Some of these scripts have embedded comments about how to customize the script.
If you cannot find a suitable script, you can request other users to write a script for you.
Once you find such a script, follow these simple steps:
|Copy the script
Copy the script from the forum (ensure that nothing is left out)
|Clear the ReNamer's Configuration pane
Open the Pascal Script Rule in ReNamer. Select the three lines you see in the Configuration pane, and press DEL. (Those lines are meant to begin a script from scratch).
|Paste the script into ReNamer pane
Use the CTRL+V shortcut or right-click and select Paste.
|Compile the script
Press the [[Image:]] button.
|Saving the script and giving it a name:
The save button is hidden under the scripts menu. So first click on the [[Image:]] button. It pops up a window like this:
[[Image:]]Note that all the existing scripts are listed here. (Your new script will also be added to this list.)
Select the Save script... option (at the very bottom of the menu). Another window pops up.
Enter a name that suggests the function of your script. Press OK. The new name is added to the list of scripts. Now use it as described before.
Writing your own scripts
To write your own scripts, you must have knowledge of Pascal script.
Learning Pascal script is easy. Refer to the Pascal Script Manual.
We will assume here that you already know how to write pascal scripts. The step-by-step procedure is as follows:
- Click in the Configuration pane and enter the script directly. (You can also copy it from anywhere and paste it into the pane by pressing CTRL+V. Or right-click in the pane and select the Paste option from the context menu.)
- Compile the script by pressing the [[Image:]] button located below the Configuration pane.
- If an error message comes up, troubleshoot the script. The fault message usually includes the line number of the problematic statement in the script. Press the [[Image:]] button and enter that line number to locate the faulty statement quickly.
- Repeat this till a Compiled successfully! message pops up..
- Press the [[Image:]] button. A list pops up:[[Image:]]
- Click on the last option in the list (Save Script... ). Now this script is added to the list (it appears above the line in the list).