Resourcen-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > RES. - EXE-Resourcen managen >

Resourcen-Commands

RES.Last Icon

Previous Top Next


MiniRobotLanguage (MRL)

 

RES.Last Icon

Get the Path and Data from the last extracted Icon

 

 

Intention

 

This command is used to get the Path and Data from the last extracted Icon.
This command is available rather for completeness, it may not be as useful as the other Commands (RES.Last Version for example).

The command will get the Path to the last extracted Icon-File into a Variable, and the Data of the File on the Top Of Stack $tos$.

To see the effect of the Program, its necessary to first "extract" an Icon.
The command can also be used after an "RES.Extractr All"

 

 

Here is a Sample-Script.

 
' This is the path to the Source-File to be extracted

VAR.$$EXE=Hello.exe

VAR.$$FIA=?path\File.exe

' The second Parameter is the Path to the root of all "Target Folders".

RES.Extract Icon|$$FIA|?path\

MBX.$tos$

' To analyze the Icon in the Script, you can use

RES.Last Icon|$$TXT

VAR.$$TXA=$tos$

' The Icon is now in $$TXA

LEN.$$TXA|$$TXA

MBX.Icon-Data-Size: $$TXA  

ENR.

 

 

 This Script will display fist this Messagebox with the path to the ".ico"-File.:

 

  Last_Icon_01

 

 
   Secondly it will display a Messagebox with the Size of the ".ico"-file.
 

  Last_Icon_02

 

 

  In most cases, multiple Icons are extracted. This command will only return the Path to the last Icon, that was extracted.
  To get Informations about the other icons, it makes sense to use the result from this command and use other commands.

Here is an example that will display all path's from all extracted Icons

 

 

 This is the path to the Source-File to be extracted

VAR.$$EXE=Hello.exe

VAR.$$FIA=?path\File.exe

' The second Parameter is the Path to the root of all "Target Folders".

RES.Extract Icon|$$FIA|?path\

MBX.$tos$

' To analyze the Icon in the Script, you can use

RES.Last Icon|$$TXT

VAR.$$TXA=$tos$

' The Icon is now in $$TXA

LEN.$$TXA|$$TXA

MBX.Icon-Data-Size: $$TXA  

GFT.h|$$TXT|$$PAT

MBX.$$PAT 

FEF.DoIt|$$TMP|$$PAT

MBX.Ready

ENR.

 

:DoIt

PRT.$$TMP

RET.

ENR. 

 

 

In case the result has a multi-language resource, you can use the Script below..
 

' This is the path to the Source-File to be extracted

VAR.$$EXE=Hello.exe

VAR.$$FIA=?path\File.exe

' The second Parameter is the Path to the root of all "Target Folders".

RES.Extract Icon|$$FIA|?path\

MBX.$tos$

' To analyze the Icon in the Script, you can use

RES.Last Icon|$$TXT

VAR.$$TXA=$tos$

' The Icon is now in $$TXA

LEN.$$TXA|$$TXA

MBX.Icon-Data-Size: $$TXA  

GFT.c|$$TXT|$$PAT

' Only needed for Multi-Language Resources

BLB.$$PAT|$$RES

MBX.$$PAT$crlf$->$$RES

FEF.DoIt|$$TMP|$$RES

MBX.Ready

ENR.

 

:DoIt

PRT.$$TMP

RET.

ENR.

 

 

 

 

 

Syntax

 

RES.Last Icon|P1

RES.LI|P1

RES.Icon Path|P1

RES.IP|P1

 

 

 

Parameter Explanation

 

P1 - Variable that will get the Path to the last extracted Icon-File.

 

 

Example

 

' This is the path to the Source-File to be extracted

VAR.$$EXE=Hello.exe

VAR.$$FIA=?path\File.exe

' The second Parameter is the Path to the root of all "Target Folders".

RES.Extract Icon|$$FIA|?path\

MBX.$tos$

' To analyze the Icon in the Script, you can use

RES.Last Icon|$$TXT

VAR.$$TXA=$tos$

' The Icon is now in $$TXA

LEN.$$TXA|$$TXA

MBX.Icon-Data-Size: $$TXA   

ENR.

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

 

See also:

 

! Ressourcen Commands

RES. - Manage Resources

  RES.Refresh Explorer

  RES.Change Icon

  RES.Change Manifest

  RES.Change Version

  RES.Extract All

  RES.Extract Icon

  RES.Extract Manifest

  RES.Extract Version

  RES.Last Manifest

  RES.Last Version

  2.2.1 '#ICO: - Choose own Icon

  2.2.2 '#ICF: - Icon from Icon-Folder

  2.2.3 '#ICS: / '#ICS: Icon-Set