Difference between revisions of "ReNamer:Rules:PascalScript"
(→Using a script: fixed broken list items) |
|||
Line 22: | Line 22: | ||
Once you find such a script, follow these simple steps: | Once you find such a script, follow these simple steps: | ||
− | |||
− | |||
{| class="prettytable" | {| class="prettytable" | ||
! <center>Step</center> | ! <center>Step</center> | ||
Line 49: | Line 47: | ||
| <center>4</center> | | <center>4</center> | ||
| '''Compile the script''' | | '''Compile the script''' | ||
− | |||
Press the [[Image:TryToCompileButton.png]] button. | Press the [[Image:TryToCompileButton.png]] button. | ||
− | |||
* In case some error comes up, you can try and troubleshoot the problematic statement in the script using the [[Image:GotoButton.png]] button. | * In case some error comes up, you can try and troubleshoot the problematic statement in the script using the [[Image:GotoButton.png]] button. | ||
− | + | *:It pops up a window like this: | |
− | It pops up a window like this:[[Image:GotoLineDialog.png]] | + | *:<center>[[Image:GotoLineDialog.png]]</center> |
− | + | *:Now enter the line number in the window and press '''OK'''. It takes you to the faulty statement. | |
− | Now enter the line number in the window and press '''OK'''. It takes you to the faulty statement. | ||
* If the script compiles successfully, this button is not required at all. | * If the script compiles successfully, this button is not required at all. | ||
Line 65: | Line 60: | ||
The '''save '''button is hidden under the '''scripts '''menu. So first click on the [[Image:ScriptsButton.png]] button. It pops up a window like this: | The '''save '''button is hidden under the '''scripts '''menu. So first click on the [[Image:ScriptsButton.png]] button. It pops up a window like this: | ||
− | [[Image:PascalScriptsMenu.png]] | + | <center>[[Image:PascalScriptsMenu.png]]</center> |
Note that all the existing scripts are listed here. (Your new script will also be added to this list.) | Note that all the existing scripts are listed here. (Your new script will also be added to this list.) | ||
Line 71: | Line 66: | ||
Select the '''Save script... '''option (at the very bottom of the menu). Another window pops up. | Select the '''Save script... '''option (at the very bottom of the menu). Another window pops up. | ||
− | [[Image:SaveScriptDialog.png]] | + | <center>[[Image:SaveScriptDialog.png]]</center> |
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. | 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. |
Revision as of 14:51, 29 June 2009
PascalScript Rule
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 button (located just below the Configuration pane).
- 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 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:
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 button located below the Configuration pane.