High Volume String Manipulations
If your development process requires high-volume string processing, Resource Tuner Console is the solution. RTC replaces all the string
resources of a medium-sized program within a second! In addition, you can convert a single-language resource directory into a multi-lingual
one, or create a copy of the resource with another specified language.
You can edit as many entries as you wish in a number of files at once. You can repeat editing anytime!
Resource Tuner Console provides many ways of editing StringTable and MessageTable entries. You can modify both filled and blank entries.
You can specify whether to add a new StringTable entry, or replace an existing entry, or replace an existing string only with the specified Language.
Resource Tuner Console fully supports Unicode. Strings to be replaced can be specified and stored whether in a script body or in an external Unicode text file. See also: A real-world script example
Let's get started with the String automation.
1. Write a simple script (see below)
2. Run Resource Tuner Console
3. You are done.
To see the changes made, we recommend using Resource Tuner GUI, a visual resource editor.

The Script Used
A description of the RTC script format and sample scripts can be found in the RTC Scripting Language Reference within the Resource Tuner Console package. See also: RTC Usage
The following example uses the EditStringTableFromFileW procedure with the EditMode argument set to CREATE_IF_NOT_EXIST to find and edit the entries specified in the Strings.txt file. This script is based on the Edit Strings sample script. It may be helpful to use this example as a template for your own scripts.
PEFileProxy.PostDebugString "Opening a file..."
PEFileProxy.OpenFile "..\demo\src\demoapp1.exe"
If (PEFileProxy.Terminated) Then
PEFileProxy.PostDebugString "Opening a file produced a fatal error."
Else
PEFileProxy.PostDebugString "File successfully opened."
If (Not PEFileProxy.HasResources) Then
PEFileProxy.PostDebugString "The file contains no resources."
Else
PEFileProxy.PostDebugString "The file contains resources."
PEFileProxy.ClearDefinitions
PEFileProxy.PostDebugString "Opening a definition file..."
PEFileProxy.OpenDefinitionFile "..\demo\defs\demoapp1.drc"
LangID = 0 ' Default
PEFileProxy.PostDebugString "Editing String Table using TXT file..."
ResourcesProxy.EditStringTableFromFileW LangID, CREATE_IF_NOT_EXIST, "..\demo\src\strings.txt"
PEFileProxy.PostDebugString "Adding a New Message Table using TXT file"
ResourcesProxy.EditMessageTableFromFileW "1", LangID, CREATE_IF_NOT_EXIST, "..\demo\src\messages.txt"
PEFileProxy.PostDebugString "Compiling all changes..."
PEFileProxy.Compile
PEFileProxy.PostDebugString "Saving file as a new file..."
PEFileProxy.SaveAsNewImage "..\demo\release\demoapp1.exe"
End If
PEFileProxy.PostDebugString "Closing this file..."
PEFileProxy.CloseFile
End If |
Download Resource Tuner Console and learn how it can make you more productive. Start tuning your applications today!
|