It is currently April 23rd, 2024, 8:27 pm

How to change color permanently without [!Refresh] of entire skin? ( WriteKeyValue, SetOption, Hide/ShowMeter )

Get help with creating, editing & fixing problems with skins
User avatar
strawberryshortcake
Posts: 79
Joined: August 27th, 2016, 12:49 am

Re: How to change color permanently without [!Refresh] of entire skin? ( WriteKeyValue, SetOption, Hide/ShowMeter )

Post by strawberryshortcake »

deflore08 wrote: November 4th, 2020, 6:41 am Regret, but you have to use 42 !WriteKeyValue bangs for this, if you want apply it permanently. :(
No biggie. Notepad++ makes copy, pasting, and editing rather quick. Would be nice to have a short cut and also group variables in the future though.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to change color permanently without [!Refresh] of entire skin? ( WriteKeyValue, SetOption, Hide/ShowMeter )

Post by balala »

strawberryshortcake wrote: November 4th, 2020, 10:13 am I'm using a K400 logitech (keyboard plus touchpad combination).

No biggie, it's relatively controllable so it doesn't trigger if I'm careful. It's specific to the MouseScrollDownAction direction only. Never triggers with Scroll -Up, -Left or -Right. I think it has something to do with the ability of the touchpad to scroll continuously when I quickly swipe and release my fingers in the down direction. It also works in the up direction, but it simply doesn't trigger the flicker. Light controlled downward touch and it does not trigger the flicker.
Ok, here is my suggestion: save a layout (just to can later easily open up all skins you have loaded now). Unload all skins exceptint the one we're talking about and try to replicate the issue this way. Does it occurr?
You can now load the previously saved layout, to get loaded all skins.
strawberryshortcake wrote: November 4th, 2020, 10:13 am My mistake, I meant SetVariable. I keep getting those two things mixed up.
Alright, clarified.
User avatar
strawberryshortcake
Posts: 79
Joined: August 27th, 2016, 12:49 am

Re: How to change color permanently without [!Refresh] of entire skin? ( WriteKeyValue, SetOption, Hide/ShowMeter )

Post by strawberryshortcake »

balala wrote: November 4th, 2020, 10:31 am Ok, here is my suggestion: save a layout (just to can later easily open up all skins you have loaded now). Unload all skins exceptint the one we're talking about and try to replicate the issue this way. Does it occurr?
You can now load the previously saved layout, to get loaded all skins.
1. Logitech K400 keyboard with touchpad. I have two and tested both. Same results.
2. Free open source OBS recording software.
3. Blank notepad open with visible scroll direction marker to identify mouse scroll direction.
4. Rainmeter Manage showing one active skin.



Regarding number 3. It's made clear by watching the video; easy to identify. Clicking on notepad activates the notepad "scroll directional indicator bars". By clicking on notepad (and without clicking anywhere else), I can still mouseaction and mousescroll over the rainmeter active skin. When I click on the active skin, it stops the notepad "scroll directional indicator bars" but obviously rainmeter's mousescrollactions still works.

Preliminary data: Up, Left, Right directional scrolling movement are good. Down touchpad scrolling movement has an issue especially prevalent when mouse clicks to activate notepad 'scroll directional indicator bars'.


Exact code in video.

Code: Select all

[Rainmeter]
Update=1000

[Variables]

Hidden=1
SHAPECOLOR=0,255,255,100
SHAPECOLOR_CLEAR=255,0,0,255
BoxCOLOR1=225,225,0,225
BoxCOLOR2=225,225,0,225


;			Yellow up
UPCOLOR=225,225,0,225
;			red left
LEFTCOLOR=225,0,0,225
;			green right
RIGHTCOLOR=0,225,0,255
;			blue down	
;DOWNCOLOR=30,30,30,5
DOWNCOLOR=0,0,225,255



[MeterStringDOWN]
Meter=String
FontColor=255,255,255
FontSize=20
X=650
Y=850
Text="Scroll Down"
Hidden=#Hidden#

[MeterStringLEFT]
Meter=String
FontColor=255,255,255
FontSize=20
X=400
Y=600
Text="Scroll Left"
Hidden=#Hidden#

[MeterStringRIGHT]
Meter=String
FontColor=255,255,255
FontSize=20
X=950
Y=600
Text="Scroll Right"
Hidden=#Hidden#

[MeterStringUP]
Meter=String
FontColor=255,255,255
FontSize=20
X=650
Y=400
Text="Scroll Up"
Hidden=#Hidden#

[MeterREMOVEUPcolor]
Meter=String
FontColor=255,255,255
FontSize=20
X=650
Y=200
Text="removed UP color"
;Hidden=1

[MeterREMOVEDDOWNcolor]
Meter=String
FontColor=255,255,255
FontSize=20
X=650
Y=950
Text="removed Down color"
Hidden=1



;--------- LARGE BOX (REFRESH SKIN BOX)
[MeterShapes]
Meter=Shape
;Shape=Rectangle 120,50,200,150 | Fill Color 255,0,0
Shape=Rectangle 120,50,200,150 | Fill Color #SHAPECOLOR#
X=50
Y=400
UpdateDivider=-1
LeftMouseUpAction=[!Refresh]
DynamicVariables=1




;--------- small box on right
[Add1b]
Meter=IMAGE
SolidColor=#BoxCOLOR2#
GROUP=CLEAR
X=800
Y=700
W=99
H=80
AntiAlias=1

MouseScrollRightAction=[!ShowMeter MeterStringRIGHT][!HideMeter MeterStringUP][!HideMeter MeterStringDOWN][!HideMeter MeterStringLEFT][!WriteKeyValue Variables BoxCOLOR2 #RIGHTCOLOR#][!SetVariable BoxCOLOR2 #RIGHTCOLOR#][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseScrollLeftAction=[!ShowMeter MeterStringLEFT][!HideMeter MeterStringUP][!HideMeter MeterStringRIGHT][!HideMeter MeterStringDOWN][!WriteKeyValue Variables BoxCOLOR2 #LEFTCOLOR#][!SetVariable BoxCOLOR2 #LEFTCOLOR#][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
;MouseScrollUpAction=[!ShowMeter MeterStringUP][!HideMeter MeterStringDOWN][!HideMeter MeterStringRIGHT][!HideMeter MeterStringLEFT][!WriteKeyValue Variables BoxCOLOR2 #UPCOLOR#][!SetVariable BoxCOLOR2 #UPCOLOR#][!UpdateMeter "#CURRENTSECTION#"][!Redraw]

;	remove Up color
MouseScrollUpAction=[!ShowMeter MeterStringUP][!HideMeter MeterStringDOWN][!HideMeter MeterStringRIGHT][!HideMeter MeterStringLEFT]


MouseScrollDownAction=[!ShowMeter MeterStringDOWN][!HideMeter MeterStringUP][!HideMeter MeterStringRIGHT][!HideMeter MeterStringLEFT][!WriteKeyValue Variables BoxCOLOR2 #DOWNCOLOR#][!SetVariable BoxCOLOR2 #DOWNCOLOR#][!UpdateMeter "#CURRENTSECTION#"][!Redraw]

;	remove down color
;MouseScrollDownAction=[!ShowMeter MeterStringDOWN][!HideMeter MeterStringUP][!HideMeter MeterStringRIGHT][!HideMeter MeterStringLEFT]

DynamicVariables=1
UpdateDivider=-1



;--------- RESET / CLEAR COLORBOX BACK TO DEFAULT
[MeterShapesBOX]
Meter=Shape
Shape=Rectangle 120,50,200,150 | Fill Color #SHAPECOLOR_CLEAR#
X=500
Y=500
;LeftMouseUpAction=[!HideMeterGroup CLEAR]
;RightMouseUpAction=[!ShowMeterGroup CLEAR]
LeftMouseUpAction=[!WriteKeyValue Variables BoxCOLOR2 "30,30,30,255"][!WriteKeyValue Variables BoxCOLOR1 "30,30,30,255"][!UpdateMeter "#CURRENTSECTION#"][!Redraw][!Refresh]
DynamicVariables=1
UpdateDivider=-1
All colors present: youtube video
Removed Down color: youtube video
Removed Up color: youtube video
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to change color permanently without [!Refresh] of entire skin? ( WriteKeyValue, SetOption, Hide/ShowMeter )

Post by balala »

strawberryshortcake wrote: November 4th, 2020, 8:54 pm 1. Logitech K400 keyboard with touchpad. I have two and tested both. Same results.
2. Free open source OBS recording software.
3. Blank notepad open with visible scroll direction marker to identify mouse scroll direction.
4. Rainmeter Manage showing one active skin.



Regarding number 3. It's made clear by watching the video; easy to identify. Clicking on notepad activates the notepad "scroll directional indicator bars". By clicking on notepad (and without clicking anywhere else), I can still mouseaction and mousescroll over the rainmeter active skin. When I click on the active skin, it stops the notepad "scroll directional indicator bars" but obviously rainmeter's mousescrollactions still works.

Preliminary data: Up, Left, Right directional scrolling movement are good. Down touchpad scrolling movement has an issue especially prevalent when mouse clicks to activate notepad 'scroll directional indicator bars'.
Unfortunately I still can't replicate the flickering, as I said before. So I1m not sure at all what to say.
Does anybody else have this flickering?
User avatar
strawberryshortcake
Posts: 79
Joined: August 27th, 2016, 12:49 am

Re: How to change color permanently without [!Refresh] of entire skin? ( WriteKeyValue, SetOption, Hide/ShowMeter )

Post by strawberryshortcake »

balala wrote: November 4th, 2020, 9:10 pm Unfortunately I still can't replicate the flickering, as I said before. So I1m not sure at all what to say.
Does anybody else have this flickering?
Preliminary conclusion: I think the skin is a good test for proper mouse or touchpad function.

I think it may just be the logitech k400 keyboard's touchpad. It's still my favorite economy keyboard. The K400 has a fluctuating retail price of $19 to $24 dollars. It was about $5.00 on sale with coupon (found out about it through Slickdeals) years ago. Best deal is usually around $10.

Are you use a keyboard with a touchpad? If so, what model and brand? I might have to look into a different keyboard with a built in touchpad down the road. Or I might have to fiddle with the keyboards setting.

The video below uses stand alone Logitech M510 mouse. It works as intended with no flicker (with both on/off notepad directional indicators).
User avatar
deflore08
Posts: 209
Joined: July 12th, 2020, 7:47 am
Location: Ada, Garden City

Re: How to change color permanently without [!Refresh] of entire skin? ( WriteKeyValue, SetOption, Hide/ShowMeter )

Post by deflore08 »

Just another way to apply colors, if you're ready to solve possible performance issues, caused by much DynamicVariables. It simplified code part cutted from working skin, but easy to understand anyway. This code will not work itself, it just a demo how you can manipulate things on a flight, and i guess it may fit your search. Method is more flexible than !SetOption, but more dangerous in means of performance.

Code: Select all


 RGB_Color                        = 231, 47 , 47
 Global_Color                     = #RGB_Color#, #Global_Alpha#

 Global_Alpha                     = 220

; --- LAST COLOR

; - It needs when you want to turn back your currently set colors when mouse left out of a color buttons

 Last_Global_Color                = 231, 47 , 47

; --- COLOR SET

; - This way to define a colors allows you to change it easily in any moment, with any way you want, include users choice.

 Red                              = #CER1#, #CEG1#, #CEB1#
 CER1                             = 231
 CEG1                             = 47
 CEB1                             = 47
 
[METER.WHICH.SETS.COLORS.TO.RED]
 YOUR                             = 
     METER                        =
          HERE                    =
 MouseOverAction                  = [!SetVariable  Global_Color "#Red#, #Global_Alpha#"][!UpdateMeter *][!Redraw]
 MouseLeaveAction                 = [!SetVariable  Global_Color "#Last_Global_Color#, #Global_Alpha#"][!UpdateMeter *][!Redraw]
 LeftMouseUpAction                = [!WriteKeyValue "Variables" "RGB_Color" " #Red#" "#@#Colors.inc"][!WriteKeyValue "Variables" "Last_Global_Color" " #Red#" "#@#Colors.inc"][!UpdateMeter *][!Redraw]
When you place mouse over a meter, it will apply needed color (or whatever you'll make), on MouseLeaveAction it will turn back previous value. Left click will apply values permanently and also will write variable which contains a previous value. Sure, you able to use any bang or plugin you want, ScrollLeft/Up/Down/Right/MouseDrag, no matter. Obviously, meters that uses these colors variables must have DynamicVariables=1, and it is a big problem here, if you have many hundred or thousands meters with DV=1.

P.S. If you have a measure that controls colors of some meters through conditions, you should update these measures (!UpdateMeasure some.measure) for applying, even if measures have DV=1.
Image * Image * Image * Image
User avatar
strawberryshortcake
Posts: 79
Joined: August 27th, 2016, 12:49 am

Re: How to change color permanently without [!Refresh] of entire skin? ( WriteKeyValue, SetOption, Hide/ShowMeter )

Post by strawberryshortcake »

deflore08 wrote: November 4th, 2020, 10:18 pm Just another way to apply colors, if you're ready to solve possible performance issues, caused by much DynamicVariables. It simplified code part cutted from working skin, but easy to understand anyway. This code will not work itself, it just a demo how you can manipulate things on a flight, and i guess it may fit your search. Method is more flexible than !SetOption, but more dangerous in means of performance.

Code: Select all


 RGB_Color                        = 231, 47 , 47
 Global_Color                     = #RGB_Color#, #Global_Alpha#

 Global_Alpha                     = 220

; --- LAST COLOR

; - It needs when you want to turn back your currently set colors when mouse left out of a color buttons

 Last_Global_Color                = 231, 47 , 47

; --- COLOR SET

; - This way to define a colors allows you to change it easily in any moment, with any way you want, include users choice.

 Red                              = #CER1#, #CEG1#, #CEB1#
 CER1                             = 231
 CEG1                             = 47
 CEB1                             = 47
 
[METER.WHICH.SETS.COLORS.TO.RED]
 YOUR                             = 
     METER                        =
          HERE                    =
 MouseOverAction                  = [!SetVariable  Global_Color "#Red#, #Global_Alpha#"][!UpdateMeter *][!Redraw]
 MouseLeaveAction                 = [!SetVariable  Global_Color "#Last_Global_Color#, #Global_Alpha#"][!UpdateMeter *][!Redraw]
 LeftMouseUpAction                = [!WriteKeyValue "Variables" "RGB_Color" " #Red#" "#@#Colors.inc"][!WriteKeyValue "Variables" "Last_Global_Color" " #Red#" "#@#Colors.inc"][!UpdateMeter *][!Redraw]
When you place mouse over a meter, it will apply needed color (or whatever you'll make), on MouseLeaveAction it will turn back previous value. Left click will apply values permanently and also will write variable which contains a previous value. Sure, you able to use any bang or plugin you want, ScrollLeft/Up/Down/Right/MouseDrag, no matter. Obviously, meters that uses these colors variables must have DynamicVariables=1, and it is a big problem here, if you have many hundred or thousands meters with DV=1.

P.S. If you have a measure that controls colors of some meters through conditions, you should update these measures (!UpdateMeasure some.measure) for applying, even if measures have DV=1.

Thanks for this. I’ll take a look at this and see if it fits with what I want to do.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to change color permanently without [!Refresh] of entire skin? ( WriteKeyValue, SetOption, Hide/ShowMeter )

Post by balala »

strawberryshortcake wrote: November 4th, 2020, 9:43 pm Are you use a keyboard with a touchpad?
No, I'm using a keyboard with a mouse.