Script processing with Resource Hacker

Jacques Paris

jacques@paris-pc-gis.com

May 2001

return to "Icons for ButtonPads"

 

Bold elements are required, italics identify variable parts, plain is for optional.

R.H. can be launched with a script file containing all the operations to be performed on one given DLL. The script that is listed below is in the file “c:\mapinfo\topics\icons\script01.txt” (the path is fictitious). The run command will be in this case:

RESHACKER.exe –script c:\mapinfo\topics\icons\script01.txt

The following example shows only the commands that are useful when building or modifying a DLL; R.H. offers more possibilities than those, see the program help file. 

A line that starts by // is a comment and can be removed.

======== file beginning ========

// if no path is given, file must be in the Resource Hacker directory

//

[FILENAMES]

//          name of the dll used as base

DLL=     button_template.dll

 

//          name of the new dll

SaveAs= c:\mapinfo\topics\icones\buttons_01.dll

 

//          log file. If no name is provided or if “Log=” is not present,

//          RESHAKER.log will be placed in R.H. directory

Log=  

 

[COMMANDS]

// addoverwrite is used to modify an existing bitmap or to add a new one

// -addoverwrite  file_name_of_the_bmp, BITMAP, bitmap_#, 0

//   0 means no language and is not required but all commas must be there

 

-addoverwrite  c:\mapinfo\topics\icones\off_on18x16_256.bmp, BITMAP, 3, 0

-addoverwrite  c:\mapinfo\topics\icones\off_on26x24_256.bmp, BITMAP, 4, 0

-addoverwrite  c:\mapinfo\topics\icones\on_off18x16_256.bmp, BITMAP, 5, 0

-addoverwrite  c:\mapinfo\topics\icones\on_off26x24_256.bmp, BITMAP, 6, 0

-addoverwrite  zit18x16_16w.bmp           ,BITMAP, 255, 0

-addoverwrite  zit26x24_16w.bmp           ,BITMAP, 256, 0

 

// to delete a bitmap. The last 0 is not required but all commas must be there.

// -delete BITMAP, bitmap_#, 0

 

-delete           BITMAP, 1, 0

-delete           BITMAP, 2, 0

 

======== file end ========

 
return to "Icons for ButtonPads"