Difference between revisions of "ReNamer:Pascal Script"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | The [[ReNamer:Rules:PascalScript|'''PascalScript Rule''']] in ReNamer uses Pascal Script. To exploit the full power of ReNamer, you will have to- | + | The [[ReNamer:Rules:PascalScript|'''PascalScript Rule''']] in ReNamer uses Pascal Script. To exploit the full power of ReNamer, you will have to- |
− | + | #Learn the basic Pascal script syntax (see this [http://www.taoyue.com/tutorials/pascal/contents.html excellent tutorial]) | |
− | + | #Learn the specific variables, procedures and functions that are defined within ReNamer (see links in REFERENCE section below).<br> | |
A few quick tips: | A few quick tips: | ||
− | *The '''FileName''' variable represents the New Name of the File. Therefore Pascal script manipulates this variable to change the filename. | + | *The '''FileName''' variable represents the New Name of the File. <br>Therefore Pascal script manipulates this variable to change the filename. |
− | *The '''FilePath''' constant holds the original path | + | *The '''FilePath''' constant holds the original path of the file. It allows you to access the file directly.<br> |
*ReNamer supports UDFs (User-Defined Functions) and also importing of external functions from DLLs. | *ReNamer supports UDFs (User-Defined Functions) and also importing of external functions from DLLs. | ||
− | *All manipulations with the '''FileName''' variable should be done using Unicode functions, i.e. '''WideString '''type should be used instead of an ordinary '''String''' type. This will allow ReNamer to handle filenames in non-English scripts (Cyrillic, Asian, German, French, etc.)<br> | + | *All manipulations with the '''FileName''' variable should be done using Unicode functions, i.e. '''WideString '''[[ReNamer:Pascal Script:Types|type]] should be used instead of an ordinary '''String''' type. This will allow ReNamer to handle filenames in non-English scripts (Cyrillic, Asian, German, French, etc.)<br> |
<span style="color: red;">'''Warning:''' Do not override ReNamer's built-in variables, [[ReNamer:Pascal Script:Types|types]] and [[ReNamer:Pascal Script:Functions|functions]]</span> | <span style="color: red;">'''Warning:''' Do not override ReNamer's built-in variables, [[ReNamer:Pascal Script:Types|types]] and [[ReNamer:Pascal Script:Functions|functions]]</span> |
Revision as of 06:06, 12 July 2009
The PascalScript Rule in ReNamer uses Pascal Script. To exploit the full power of ReNamer, you will have to-
- Learn the basic Pascal script syntax (see this excellent tutorial)
- Learn the specific variables, procedures and functions that are defined within ReNamer (see links in REFERENCE section below).
A few quick tips:
- The FileName variable represents the New Name of the File.
Therefore Pascal script manipulates this variable to change the filename. - The FilePath constant holds the original path of the file. It allows you to access the file directly.
- ReNamer supports UDFs (User-Defined Functions) and also importing of external functions from DLLs.
- All manipulations with the FileName variable should be done using Unicode functions, i.e. WideString type should be used instead of an ordinary String type. This will allow ReNamer to handle filenames in non-English scripts (Cyrillic, Asian, German, French, etc.)
Warning: Do not override ReNamer's built-in variables, types and functions
Warning: Some of the functions are able to alter your file system (create new folders, move files, etc.). So use them with caution!
Reference
In a nutshell
- How to rename a file (using the FileName variable)
- How to skip extention (Basic FileName utilities)
- How to convert the filename to ALLCAPS (the WideUpperCase function)
- How to operate on words (Unicode string-handling routines)
- How to serialize files (Basic conversion routines)
- How to initialize variables
- How to create interactive dialogs (let the user decide)
- How to work with folders and paths (FilePath)
- How to break the script execution