It is currently March 28th, 2024, 9:51 pm

I can't get icon from .exe to Large Launcher Buttons

Get help with creating, editing & fixing problems with skins
Minh Hai
Posts: 1
Joined: December 31st, 2021, 2:28 am

I can't get icon from .exe to Large Launcher Buttons

Post by Minh Hai »

{
;Large Launcher Buttons====================

LLT1=FireFox
;Program Name
LLP1=C:\Program Files\Mozilla Firefox\firefox.exe
;Program Path
LLI1=C:\Program Files\Mozilla Firefox\firefox.exe
;Program Icon
}
I set icon firefox from firefox.exe, but there are many icon in .exe, rainmeter can't select one of them. if get icon from .ico with single icon is OK.

{
LLT5=Inventor
LLP5=C:\Program Files\Autodesk\Inventor 2017\Bin\Inventor.exe
LLI5=%SystemRoot%\Installer\{7F4DD591-2164-0001-0000-7107D70F3DB4}\InventorPro.ico
}

Pls help me. Thanks!
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: I can't get icon from .exe to Large Launcher Buttons

Post by death.crafter »

Minh Hai wrote: December 31st, 2021, 2:34 am {
;Large Launcher Buttons====================

LLT1=FireFox
;Program Name
LLP1=C:\Program Files\Mozilla Firefox\firefox.exe
;Program Path
LLI1=C:\Program Files\Mozilla Firefox\firefox.exe
;Program Icon
}
I set icon firefox from firefox.exe, but there are many icon in .exe, rainmeter can't select one of them. if get icon from .ico with single icon is OK.

{
LLT5=Inventor
LLP5=C:\Program Files\Autodesk\Inventor 2017\Bin\Inventor.exe
LLI5=%SystemRoot%\Installer\{7F4DD591-2164-0001-0000-7107D70F3DB4}\InventorPro.ico
}

Pls help me. Thanks!
Not sure what you are trying to do here... either post the complete code, or an excerpt that can describe what you are trying to do and how
from the Realm of Death
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: I can't get icon from .exe to Large Launcher Buttons

Post by sl23 »

From what I can see, it is an attempt to use an icon from the exe file as an icon to launch the app.

For example, setting a skin to launch Firefox. Exe should show that icon as its button. Instead of having to find or extract the icon separately.

Shame it can't be done simply.
- MuLab -
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: I can't get icon from .exe to Large Launcher Buttons

Post by CodeCode »

Have a look at this example: File View can get icons for you .

Or straight into the same code right here:

Code: Select all

[Rainmeter]
Update=1000
MouseScrollUpAction=[!CommandMeasure mPath "IndexUp"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!CommandMeasure mPath "IndexDown"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Variables]
IconSize=Large

;----------------------------------------------------
; Styles
;----------------------------------------------------

[TextStyle]
FontColor=255,255,255,255
AntiAlias=1

[TextHighlight]
FontColor=150,150,255,255

[IconStyle]
X=5
Y=r
AntiAlias=1

[HighlightStyle]
SolidColor=0,0,0,1
X=5
Y=5R
W=380
H=([Index1Icon:H] > [Index1Info:H] ? [Index1Icon:H] : [Index1Info:H])
DynamicVariables=1
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "50,50,255,150"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor ""][!UpdateMeter #CURRENTSECTION#][!Redraw]

[InfoStyle]
X=5R
Y=r
Text="%1 #CRLF#%2 #CRLF#%3 "
AutoScale=1
AntiAlias=1

;----------------------------------------------------
; Measures
;----------------------------------------------------

[mPath]
Measure=Plugin
Plugin=FileView
Path="C:"
Count=8

[mFolderCount]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FolderCount
Group=Children

[mFileCount]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileCount
Group=Children

[mFolderSize]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FolderSize
Group=Children

;----------------------------------------------------
; Index 1

[mIndex1Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=1
Group=Children

[mIndex1Size]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileSize
Index=1
Group=Children

[mIndex1Date]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileDate
Index=1
Group=Children

[mIndex1Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=1
Group=Children

;----------------------------------------------------
; Index 2

[mIndex2Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=2
Group=Children

[mIndex2Size]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileSize
Index=2
Group=Children

[mIndex2Date]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileDate
Index=2
Group=Children

[mIndex2Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=2
Group=Children

;----------------------------------------------------
; Index 3

[mIndex3Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=3
Group=Children

[mIndex3Size]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileSize
Index=3
Group=Children

[mIndex3Date]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileDate
Index=3
Group=Children

[mIndex3Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=3
Group=Children

;----------------------------------------------------
; Index 4

[mIndex4Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=4
Group=Children

[mIndex4Size]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileSize
Index=4
Group=Children

[mIndex4Date]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileDate
Index=4
Group=Children

[mIndex4Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=4
Group=Children

;----------------------------------------------------
; Index 5

[mIndex5Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=5
Group=Children

[mIndex5Size]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileSize
Index=5
Group=Children

[mIndex5Date]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileDate
Index=5
Group=Children

[mIndex5Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=5
Group=Children

;----------------------------------------------------
; Index 6

[mIndex6Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=6
Group=Children

[mIndex6Size]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileSize
Index=6
Group=Children

[mIndex6Date]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileDate
Index=6
Group=Children

[mIndex6Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=6
Group=Children

;----------------------------------------------------
; Index 7

[mIndex7Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=7
Group=Children

[mIndex7Size]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileSize
Index=7
Group=Children

[mIndex7Date]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileDate
Index=7
Group=Children

[mIndex7Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=7
Group=Children

;----------------------------------------------------
; Index 8

[mIndex8Name]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileName
Index=8
Group=Children

[mIndex8Size]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileSize
Index=8
Group=Children

[mIndex8Date]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileDate
Index=8
Group=Children

[mIndex8Icon]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=Icon
IconSize=#IconSize#
Index=8
Group=Children

;----------------------------------------------------
; Meters
;----------------------------------------------------

[Background]
Meter=Image
SolidColor=0,0,0,200
W=400
H=500

[PathTitle]
Meter=String
MeterStyle=TextStyle
Text=Path:

[Path]
Meter=String
MeasureName=mPath
MeterStyle=TextStyle | TextHighlight
Text="%1 "
X=R

[FolderCountTitle]
Meter=String
MeterStyle=TextStyle
X=0
Y=R
Text=Folders:

[FolderCount]
Meter=String
MeasureName=mFolderCount
MeterStyle=TextStyle | TextHighlight
X=R
Y=r

[FileCountTitle]
Meter=String
MeterStyle=TextStyle
X=10R
Y=r
Text=Files:

[FileCount]
Meter=String
MeasureName=mFileCount
MeterStyle=TextStyle | TextHighlight
X=R
Y=r

[FolderSizeTitle]
Meter=String
MeterStyle=TextStyle
X=10R
Y=r
Text=Size:

[FolderSize]
Meter=String
MeasureName=mFolderSize
MeterStyle=TextStyle | TextHighlight
X=R
Y=r
AutoScale=1

[Index1]
Meter=Image
MeterStyle=HighlightStyle
LeftMouseDoubleClickAction=[!CommandMeasure mIndex1Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index1Icon]
Meter=Image
MeasureName=mIndex1Icon
MeterStyle=IconStyle

[Index1Info]
Meter=String
MeasureName=mIndex1Name
MeasureName2=mIndex1Size
MeasureName3=mIndex1Date
MeterStyle=TextStyle | InfoStyle

[Index2]
Meter=Image
MeterStyle=HighlightStyle
LeftMouseDoubleClickAction=[!CommandMeasure mIndex2Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index2Icon]
Meter=Image
MeasureName=mIndex2Icon
MeterStyle=IconStyle

[Index2Info]
Meter=String
MeasureName=mIndex2Name
MeasureName2=mIndex2Size
MeasureName3=mIndex2Date
MeterStyle=TextStyle | InfoStyle

[Index3]
Meter=Image
MeterStyle=HighlightStyle
LeftMouseDoubleClickAction=[!CommandMeasure mIndex3Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index3Icon]
Meter=Image
MeasureName=mIndex3Icon
MeterStyle=IconStyle

[Index3Info]
Meter=String
MeasureName=mIndex3Name
MeasureName2=mIndex3Size
MeasureName3=mIndex3Date
MeterStyle=TextStyle | InfoStyle

[Index4]
Meter=Image
MeterStyle=HighlightStyle
LeftMouseDoubleClickAction=[!CommandMeasure mIndex4Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index4Icon]
Meter=Image
MeasureName=mIndex4Icon
MeterStyle=IconStyle

[Index4Info]
Meter=String
MeasureName=mIndex4Name
MeasureName2=mIndex4Size
MeasureName3=mIndex4Date
MeterStyle=TextStyle | InfoStyle

[Index5]
Meter=Image
MeterStyle=HighlightStyle
LeftMouseDoubleClickAction=[!CommandMeasure mIndex5Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index5Icon]
Meter=Image
MeasureName=mIndex5Icon
MeterStyle=IconStyle

[Index5Info]
Meter=String
MeasureName=mIndex5Name
MeasureName2=mIndex5Size
MeasureName3=mIndex5Date
MeterStyle=TextStyle | InfoStyle

[Index6]
Meter=Image
MeterStyle=HighlightStyle
LeftMouseDoubleClickAction=[!CommandMeasure mIndex6Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index6Icon]
Meter=Image
MeasureName=mIndex6Icon
MeterStyle=IconStyle

[Index6Info]
Meter=String
MeasureName=mIndex6Name
MeasureName2=mIndex6Size
MeasureName3=mIndex6Date
MeterStyle=TextStyle | InfoStyle

[Index7]
Meter=Image
MeterStyle=HighlightStyle
LeftMouseDoubleClickAction=[!CommandMeasure mIndex7Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index7Icon]
Meter=Image
MeasureName=mIndex7Icon
MeterStyle=IconStyle

[Index7Info]
Meter=String
MeasureName=mIndex7Name
MeasureName2=mIndex7Size
MeasureName3=mIndex7Date
MeterStyle=TextStyle | InfoStyle

[Index8]
Meter=Image
MeterStyle=HighlightStyle
LeftMouseDoubleClickAction=[!CommandMeasure mIndex8Name "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]

[Index8Icon]
Meter=Image
MeasureName=mIndex8Icon
MeterStyle=IconStyle

[Index8Info]
Meter=String
MeasureName=mIndex8Name
MeasureName2=mIndex8Size
MeasureName3=mIndex8Date
MeterStyle=TextStyle | InfoStyle

[PageUp]
Meter=String
MeterStyle=TextStyle
FontSize=15
X=5
Y=10R
Text=Page Up
LeftMouseDoubleClickAction=[!CommandMeasure mPath "PageUp"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "50,50,255,150"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor ""][!UpdateMeter #CURRENTSECTION#][!Redraw]

[PageDown]
Meter=String
MeterStyle=TextStyle
FontSize=15
X=10R
Y=r
Text=Page Down
LeftMouseDoubleClickAction=[!CommandMeasure mPath "PageDown"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "50,50,255,150"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor ""][!UpdateMeter #CURRENTSECTION#][!Redraw]

[PreviousFolder]
Meter=String
MeterStyle=TextStyle
FontSize=15
X=10R
Y=r
Text=Previous Folder
LeftMouseDoubleClickAction=[!CommandMeasure mPath "PreviousFolder"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!UpdateMeter *][!Redraw]
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "50,50,255,150"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor ""][!UpdateMeter #CURRENTSECTION#][!Redraw]
The code should work out of the box.
Read through it, and cull what you dont need until the most basic version you can have and keep it working remains. This way you gain a lot of understanding and also learn new ideas.

I notice that you are using curly brackets "{}", and syntax format like C++. That is not how rainmeter is intended to be coded. Rainmeter runs with script that is to say not a programming language like C++.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: I can't get icon from .exe to Large Launcher Buttons

Post by sl23 »

Read through it, and cull what you dont need until the most basic version you can have and keep it working remains. This way you gain a lot of understanding and also learn new ideas.
This is what I do... :oops: :Whistle
It's a bit plagiaristic, but I've learnt a great deal through this this method. :D
- MuLab -