Page 1 of 1

Icons set

Posted: November 16th, 2017, 9:33 pm
by Hunter230785
Hi!
I'm trying to write a skin with text "icons" and 2 tabs. The code below under spoiler.
The purpose is starting programs, open folders and minimizing the code. )
Please, help!
[hr][/hr]

Code: Select all

; -----------------------------------------------------------------------------------------
; BASE
; -----------------------------------------------------------------------------------------
[Rainmeter]
	Update               =50
	BackgroundMode       =2                  ;clickable
	SolidColor           =0,0,0,100
[Variables]
	H                    =#WorkAreaHeight#
	W                    =300                ;#WorkAreaWidth#
	FontColorActive      =255,255,0,255
	FontColorPassive     =150,150,150,255
[PanelStyle]
	Meter                =IMAGE
	FontSize             =25
	FontFace             =Courier New
	FontColor            =255,255,255,255
	AntiAlias            =1
	ClipString           =1 
	H                    =#WorkAreaHeight#
	W                    =160                ;#WorkAreaWidth#
; -----------------------------------------------------------------------------------------
; MODES
; -----------------------------------------------------------------------------------------
[Programs]
	Meter                =STRING
	Text                 ="● PROGRAMS"
	FontColor            =255,192,0,255
	LeftMouseUpAction    =!Execute [!ToggleMeterGroup 1][!HideMeterGroup 2] [!Update]
	Y                    =50
[Folders]
	Meter                =STRING
	Text                 ="● FOLDERS"
	FontColor            =255,192,0,255
	LeftMouseUpAction    =!Execute [!ToggleMeterGroup 2][!HideMeterGroup 1] [!Update]
	Y                    =70
; -----------------------------------------------------------------------------------------
; ACTIONS
; -----------------------------------------------------------------------------------------
; >> PROGRAMS ICONS SET
[MeasurePrograms]
	Measure              =TIME
	UpdateDivider        =-1
	Format               =ENPPPP PPPPPP PPPPPP PPPPPP PPPPPP PPPPPP
[MeterPrograms]
	Group                =1
	Hidden               =0
	Meter                =STRING
	MeterStyle           =PanelStyle
	MeasureName          =MEASUREPROGRAMS
	Y                    =100
; >> FOLDERS ICONS SET
[MeasureFolders]
	Measure              =TIME
	UpdateDivider        =-1
	Format               =WSFFFF FFFFFF FFFFFF FFFFFF FFFFFF FFFFFF
[MeterFolders]
	Group                =2
	Hidden               =1
	Meter                =STRING
	MeterStyle           =PanelStyle
	MeasureName          =MEASUREFOLDERS
	Y                    =100
; >> ACTION
[IconMeter]
	Meter                =IMAGE
	MeterStyle           =Style#Var#
	DynamicVariables     =1
	MouseOverAction      =[!SetOption IconMeter 0,0,0][!Redraw]
	MouseLeaveAction     =[!SetOption IconMeter FontColor 255,0,0][!Redraw]
[StyleE]
	LeftMouseDownAction  ="%windir%\explorer.exe"
	RightMouseDownAction ="%windir%"
	ToolTipText          =Explorer
[StyleN]
	LeftMouseDownAction  ="%windir%\system32\notepad.exe"
	RightMouseDownAction ="%windir%\system32"
	MouseOverAction      =[!SetOption MeterE IconMeter 0,0,0][!Redraw]
	ToolTipText          =Notepad
[StyleW]
	LeftMouseDownAction  ="%windir%"
	RightMouseDownAction ="%sysdrive%"
	ToolTipText          =Windows
[StyleW]
	LeftMouseDownAction  ="%system32%"
	RightMouseDownAction ="%windir%"
	ToolTipText          =System32
[hr][/hr]

Re: Icons set

Posted: November 17th, 2017, 2:20 pm
by eclectic-tech
Try this as starting point. Made a lot of corrections...

Code: Select all

; -----------------------------------------------------------------------------------------
; BASE
; -----------------------------------------------------------------------------------------
[Rainmeter]
Update=250
BackgroundMode=2
;clickable
SolidColor=0,0,0,100
[Variables]
;H=#WorkAreaHeight#
;W=300 
;#WorkAreaWidth#
;FontColorActive=255,255,0,255
;FontColorPassive=150,150,150,255
; [MeasurePrograms]
; Measure=TIME
; UpdateDivider=-1
; Format=ENPPPP PPPPPP PPPPPP PPPPPP PPPPPP PPPPPP
; [MeasureFolders]
; Measure=TIME
; UpdateDivider=-1
; Format=WSFFFF FFFFFF FFFFFF FFFFFF FFFFFF FFFFFF
[Panel]
Meter=IMAGE
FontSize=25
FontFace=Courier New
FontColor=255,255,255,255
AntiAlias=1
ClipString=1
H=#WorkAreaHeight#
W=160
;#WorkAreaWidth#
[IconStyle]
X=1R
Y=r
W=30
H=30
StringAlign=CenterCenter
InLineSetting=Size | 18
InLineSetting2=Color | 255,0,0
InLineSetting3=Weight | 600
MouseOverAction=[!SetOption #CurrentSection# InLineSetting2 "Color | 0,0,0"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CurrentSection# InLineSetting2 "Color | 255,0,0][!UpdateMeter *][!Redraw]
[StyleE]
[StyleN]
[StyleS]
[StyleW]
; ; -----------------------------------------------------------------------------------------
; MODES
; -----------------------------------------------------------------------------------------
[Programs]
Meter=STRING
Text="● PROGRAMS"
FontColor=255,192,0,255
LeftMouseUpAction=[!ToggleMeterGroup 1][!HideMeterGroup 2]
Y=50
[Folders]
Meter=STRING
Text="● FOLDERS"
FontColor=255,192,0,255
LeftMouseUpAction=[!ToggleMeterGroup 2][!HideMeterGroup 1]
Y=70
-----------------------------------------------------------------------------------------
; ACTIONS
; -----------------------------------------------------------------------------------------
; >> PROGRAMS ICONS SET
[MeterPrograms1]
Group=1
Hidden=1
Meter=STRING
MeterStyle=IconStyle
X=15
Y=100
Text=E
LeftMouseUpAction="%windir%\explorer.exe"
RightMouseUpAction="%windir%"
ToolTipText=Explorer
[MeterPrograms2]
Group=1
Hidden=1
Meter=STRING
MeterStyle=IconStyle
Text=N
LeftMouseUpAction="%windir%\system32\notepad.exe"
RightMouseUpAction="%windir%\system32"
ToolTipText=Notepad
[MeterPrograms3]
Group=1
Hidden=1
Meter=STRING
MeterStyle=IconStyle
Text=P
[MeterPrograms4]
Group=1
Hidden=1
Meter=STRING
MeterStyle=IconStyle
Text=P
[MeterPrograms5]
Group=1
Hidden=1
Meter=STRING
MeterStyle=IconStyle
Text=P
; >> FOLDERS ICONS SET
[MeterFolders1]
Group=2
Hidden=1
Meter=STRING
MeterStyle=IconStyle
X=15
Y=100
Text=S
LeftMouseUpAction="%windir%"
RightMouseUpAction="%system32%"
ToolTipText=Windows
[MeterFolders2]
Group=2
Hidden=1
Meter=STRING
MeterStyle=IconStyle
Text=W
LeftMouseUpAction="%system32%"
RightMouseUpAction="%windir%"
ToolTipText=System32
[MeterFolders3]
Group=2
Hidden=1
Meter=STRING
MeterStyle=IconStyle
Text=F
[MeterFolders4]
Group=2
Hidden=1
Meter=STRING
MeterStyle=IconStyle
Text=F
[MeterFolders5]
Group=2
Hidden=1
Meter=STRING
MeterStyle=IconStyle
Text=F
; >> ACTION
; [IconMeter]
; Meter=IMAGE
; MeterStyle=Style#Var#
; DynamicVariables=1
2tabs.png

Re: Icons set

Posted: November 17th, 2017, 3:38 pm
by Hunter230785
Thank you, eclectic-tech!
But I would like to write "ENPPPP..." in one line, and then assign actions to each letter (opening the program, folder, etc.).
How can I do that as starting point?

Re: Icons set

Posted: November 17th, 2017, 10:51 pm
by eclectic-tech
Hunter230785 wrote:Thank you, eclectic-tech!
But I would like to write "ENPPPP..." in one line, and then assign actions to each letter (opening the program, folder, etc.).
How can I do that as starting point?
There can only be ONE of each available mouse ACTIONS on a single section. So if you write a string section with text="ENPPPP...", you cannot assign different actions to each letter, the action will apply to the entire string.

That is why I created separate sections for each letter, positioned them one after the other in one line, and assigned the left/right actions you had to each string section.

It achieves the same "look", and allows you to assign different actions, format them individually, plus have mouseover/mouseleave actions on each letter.

Not sure why you want a one long string, but if you must, there cannot be multiple common actions on individual letters.

Re: Icons set

Posted: November 17th, 2017, 11:06 pm
by Hunter230785
Is this final? Or we can find a solution through the [Substitute] or the Lua script?

Re: Icons set

Posted: November 17th, 2017, 11:51 pm
by jsmorley
Hunter230785 wrote:Is this final? Or we can find a solution through the [Substitute] or the Lua script?
Yeah, it's final. It's not about how the letters are formatted or any such, it's about the fact that there can only be one of each of the mouse actions on a single meter. So to have two LeftMouseUpActions (for instance), you have to have two meters. Every option in a section in a .ini file must be unique. You can't have two of anything in a single [SectionName].

Re: Icons set

Posted: November 18th, 2017, 9:54 am
by Hunter230785
OK. Thanks!