Free Trial Software Downloads Command-line Resource Editor
Heaventools Home
 

home      products      solutions     news     downloads     order     support     about us

 

 
Resource Tuner Console
 

 

 

Deutsch Deutsch  

Get Started With RTC

Usage

Win32 Resource DLL editorResource Tuner Console is a command-line tool. It's a scriptable program runnable from the console, and is intended to be used from scripts. You can also use Resource Tuner, a visual resource editor, instead of Resource Tuner Console. For more information, see Resource Tuner GUI.

Resource Tuner Console (RTC) accepts input from a script file. It reads and executes scripts using the Windows Scripting Host engine. RTC uses VBScript as a general scripting language. RTC scripts have an .RTS (meaning Resource Tuner Script) extension. Script files are usually edited in any ASCII or Unicode plain text editor.    [Download a trial version]

Resource Tuner Console

Invoking the program from the command prompt

From the command prompt, type rtc.exe /F:ScriptName (including the full path, if any).

Example: rtc.exe /F:"c:\temp\my_script.rts"

Running from the .bat file

Create a .bat file and put rtc.exe /F:ScriptName in it.

Have a look in the Resource Tuner Console directory for some .bat file examples.

[Sample Scripts]    [FAQ]

Script Reference Help FileRTC Scripting Language Reference Help File (.CHM)


Syntax

RTC [options] /F:ScriptName

Options and switches:

 /S

Silent On.

 /L[:LogName]

Logging On.

 /A

Append Log.

 /plhdXX="Value"

Pass Value using a Placeholder.

 /E

User Language Override.


Example:
rtc /L:logfile.txt /A /plhdBuildVersion="1010" /F:edit_icons.rts /E

Parameters

/F:ScriptName
Script File Name. Required. Specifies the name of a script file. By default, the program expects to find the script file under the same directory the program is located if this parameter does not contain a fully qualified pathname. If a file name and/or pathnames contain a space, they must be enclosed in double quotes.

Example:
/F:"c:\temp\my_script.rts"

Options and Switches

/S
Silent On. Optional. Instructs the program to be silent. No events will be displayed on the screen.

/L[:LogName]
Logging On. Optional. Specifies the name of a log file (including the full path, if any) and causes the program to create a log file detailing all events and actions taken during the editing process. If you suspect a script does not produce the desired results the log file will tell you every little detail. Don't forget to use quotes if the log name contains spaces. If the LogName argument is omitted, the program will use the default RTC.log name and creates a log file in the same directory the program is located. If the /L parameter is omitted, the program will not output to file.

/E
User Language Override. Optional. Instructs the program to always use English for its output. If the /E parameter is omitted, RTC outputs messages in either English, German, Spanish or French, depending upon the user's locale.

/A
Append Log. Optional. Instructs the program to append a log to the existing log file. If the /A parameter is omitted, the program will overwrite the existing log file.

/plhdXX="Value"
Value substitution. Optional. Instructs the program to find a specified placeholder plhdXX within your script and replace it with the Value, where:

plhd - The reserved word (meaning "placeholder"). Required!
XX - Any id. For example, /PLHD01 or /plhd_MyData
Value - Any value you wish to pass into the script. Quotes are required!

Placeholder Usage Guidelines

You can use multiple placeholders in your scripts. You can write one generic script and just invoke it with different parameters. Every placeholder in the script body must be enclosed by % signs.

Example:

rtc /L /plhd_bool="True" /plhd_str="Hello!" /F:my_script.rts

During script execution, the following lines in the script "my_script.rts":

...........
MainFlag = %plhd_bool%
HelloStr = "%plhd_str%"
...........

will be replaced with:

...........
MainFlag = True
HelloStr = "Hello!"
...........

RTC Scripts

There are no particular requirements except that every script must contain the Main procedure, enclosed by Sub and End Sub statements. Inside the Main procedure there can be any number of statements. A familiarity with VBScript helps with reading and writing the scripts.

Example:

Sub Main
' Place your script here
' ...
' ...
End Sub

Comments can be placed in the script by typing a single quotation mark at the beginning of a line. The script engine ignores all comments. For example:

' This is a brief comment describing what
' I'm doing.

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. Please take a few moments to review the help, you will better familiarize yourself with the program and learn more about all the features available.

  Download a RTC Scripting Language Reference Help File (.CHM) 125 kb

To give you an idea of how this all works, we made few sample scripts and test applications. Once installed Resorce Tuner Console, you will find the sample scripts in the directory where RTC has been installed. The setup program will also create the "..\Demo" folder under the RTC folder, with the test applications in the "..\Demo\Src" folder.

Exit codes

Resource Tuner Console will return an exit code of 0 if the script was successful, 1 if the command line parameters were invalid, 2 if the script file could not be opened, and 3 if the script failed, or a syntax error occurred. For example:

@echo off  
 
start /wait rtc.exe /F:"c:\temp\my_script.rts"

 if errorlevel 0 goto 0

 if errorlevel 1 goto 1

 if errorlevel 2 goto 2

 if errorlevel 3 goto 3

 goto done

 :0  
 echo Script finished successfully 
 goto done  

 :1 
 echo ERROR: Invalid parameters   
 goto done   
 
 :2   
 echo ERROR: Script file could not be opened
 goto done   
  
 :3
 echo ERROR: Script failed
  
 :done

Examples

   Example 1

The following command runs the script and creates a log file named rtc.log by default in the same directory the program is located:

   RTC /L /F:"C:\RTC Folder\my test script.rts"

As shown in the example above, filenames that include spaces must be enclosed in quotes.

In response, Resource Tuner Console displays in details all events and actions taken during the editing process. Any syntax errors and/or errors encountered during compilation will be reported for you to correct.

   Example 2

The following command silently runs the script and creates or appends a log to the existing log file named my logfile.log in the user defined directory:

   RTC /S /L:"D:\logs\my logfile.log" /A /F:my_script.rts

As shown in the example above, filenames that include spaces must be enclosed in quotes.

In response, Resource Tuner Console displays no events on the console screen.

[Sample Scripts]    [FAQ]

Start tuning your applications now

Resource Tuner Console offers exceptional value for money and delivers functionality that reaches far beyond its price tag. Discover how you and your organization can benefit from this exciting program. Start tuning your applications today!

Buy NowBuy Resource Tuner Console now for US$ 199, and make resource editing easier and faster.

Download a 60 day trial version of RTC     How to Order

     

Home  •   Site Map  •   Purchase  •   Downloads  •   Support  •   F.A.Q.  •   Forum  •   About