====================================
Resource Hacker Script Syntax:
====================================

ResourceHacker.exe -script filename

A script file is a text file with the following layout:
=======================================================

  //comments are preceded by double slashes
   
  [FILENAMES]
  Open=
  Save=
  Log=

  [COMMANDS]
  //one or more of the following commands ...
  -add          ResourceSrc, ResourceMask
  -addskip      ResourceSrc, ResourceMask
  -addoverwrite ResourceSrc, ResourceMask
  -addoverwrite ResourceSrc, ResourceMask
  -modify       ResourceSrc, ResourceMask
  -extract      ResourceTgt, ResourceMask
  -delete       ResourceMask
  -changelanguage(langID)
	
=======================================================

Notes: 

Filenames that include spaces must be enclosed within double quotes.
ResourceSrc and ResourceTgt represent filenames.
The changelanguage() action changes the language ID of ALL resources


ResourceMask: 
  Format - Type,Name,Language
  Each of Type, Name & Language are optional but the 2 commas are mandatory.
  'Type' may be either an integer or text but text should be encased within
  double quotes to differentiate it from integer identifiers.
  'Name' if defined may be either an integer or text.
  'Language' if defined must be an integer.
  Predefined Resource Type identifiers are listed here:
  https://msdn.microsoft.com/en-us/library/windows/desktop/aa381043.aspx
  
Log: 
  Can be either a filename or CONSOLE or NUL
  It's optional and if it's omitted defaults to resourcehacker.log. 
      
=======================================================

Example 1: rh_script_myprog_rus.txt
	
  //This script deletes all Language Neutral (0)
  //string-table, menu and dialog resource items
  //in MyProg.exe before replacing them
  //with Russian language items...

  [FILENAMES]
  Open = MyProg.exe
  Save = MyProg_Rus.exe
  Log  = CONSOLE

  [COMMANDS]
  -delete  MENU,,0
  -delete  DIALOG,,0
  -delete  STRINGTABLE,,0
  -add     MyProg_Rus.res, MENU,,
  -add     MyProg_Rus.res, DIALOG,,
  -add     MyProg_Rus.res, STRINGTABLE,,
  -changelanguage(1049)
		
Example 2: rh_script_myprog_upd_images.txt
	
  //This script updates 2 bitmaps and an
  //icon in MyProg.exe ...

  [FILENAMES]
  Exe=    MyProg.exe
  SaveAs= MyProg_Updated.exe

  [COMMANDS]
  -addoverwrite Bitmap128.bmp, BITMAP,128,
  -addoverwrite Bitmap129.bmp, BITMAP,129,0
  -addoverwrite MainIcon.ico, ICONGROUP,MAINICON,0
	
Example 3: rh_script_myprog_upd_all.txt
	
  //This script replaces all resources
  //in MyProg.exe with all the resources
  //in MyProgNew.res

  [FILENAMES]
  Exe=    MyProg.exe
  SaveAs= MyProg_Updated.exe

  [COMMANDS]
  -delete  ,,,            //delete all resources before...
  -add MyProgNew.res ,,,  //adding all the new resources	 


