It is currently November 30th, 2021, 3:37 am

Hide and Show issues: disapeearing strings

Help with creating, editing & fixing problems with skins
MatteoFlash
Posts: 23
Joined: June 26th, 2010, 8:11 am

Hide and Show issues: disapeearing strings

Post by MatteoFlash »

Hi Guys,

I'm workin on a Temp plugin (with some suggestions from users in the Forum, very available with me).
I'm going to create two pages of measurement in the same Config:
- Page 1: instant measurements
- Page 2: minimum and maximum values

So I created two simple buttons, just to try:
[PageLeft]
Meter=String
Text=">"
LeftMouseDownAction=!Execute [!RainmeterShowMeter CpuTempMinShow1][!RainmeterShowMeter CpuTempMaxShow1][!RainmeterHideMeter CPU1Graph1][!RainmeterHideMeter CPU1Graph2][!RainmeterHideMeter CPU1°][!RainmeterHideMeter PageLeft][!RainmeterShowMeter PageRight][!RainmeterRedraw]

[PageRight]
Meter=String
Hidden=1
SolidColor=0, 0, 0, 60
Text="<"
LeftMouseDownAction=!Execute [!RainmeterHide CpuTempMinShow1][!RainmeterHideMeter CpuTempMinShow1][!RainmeterShowMeter CPU1Graph1][!RainmeterShowMeter CPU1Graph2][!RainmeterShowMeter CPU1°][!RainmeterShowMeter PageLeft][!RainmeterHideMeter PageRight]
CPU1Graph1, CPU1Graph2, CPU1° = config which I want to show in Page 1
CpuTempMinShow1, CpuTempMaxShow1 = config which I want to show in Page 2

Ignoring the formulas (created with the help of user kenz0), these are the tool I want to show up in the second page:
[CpuTempMinShow1]
MeasureName=CpuTempMin1
Meter=String
Text="%1°C"
DynamicVariables=1
Hidden=1

[CpuTempMaxShow1]
MeasureName=CpuTempMax1
Meter=String
Text="%1°C"
DynamicVariables=1
Hidden=1
I removed all esthetic settings to clean up the reading of the code.

The problem is that, when I clic on "PageLeft" showed as ">", Min and Max appear for a second til a next refresh, in which they disappear. Then, when I clic on "<" and again on ">", they reappear just until next refresh.

Am I wrong with some Redraw of the skin? (without RainmeterRedraw, it didn't work).

Ty all :)
poiru
Developer
Posts: 2871
Joined: April 17th, 2009, 12:18 pm

Re: Hide and Show issues: disapeearing strings

Post by poiru »

Could you post the entire code?
MatteoFlash
Posts: 23
Joined: June 26th, 2010, 8:11 am

Re: Hide and Show issues: disapeearing strings

Post by MatteoFlash »

Okey. I extract one measurement from the total Skin, so we can work easily.
[Rainmeter]
BackgroundMode=1
Author=Flash

[Background]
Meter=String
x=0
Y=0
W=200
SolidColor=0, 0, 0, 0

[Variables]
@include=#SKINSPATH#Flash\DefaultVariables.inc
m=>

;#############
; Buttons
;#############

[PageLeft]
Meter=String
X=200
Y=0
W=13
H=14
FontFace=#FontName#
FontSize=#FontSize#
FontColor=#FontRGB#
StringAlign=Right
SolidColor=0, 0, 0, 60
Text=">"
LeftMouseDownAction=!Execute [!RainmeterShowMeter CpuTempMinShow1][!RainmeterShowMeter CpuTempMaxShow1][!RainmeterHideMeter CPU1Graph1][!RainmeterHideMeter CPU1Graph2][!RainmeterHideMeter CPU1°][!RainmeterHideMeter PageLeft][!RainmeterShowMeter PageRight][!RainmeterRedraw]

[PageRight]
Meter=String
X=187
Y=0
W=13
H=14
FontFace=#FontName#
FontSize=#FontSize#
FontColor=#FontRGB#
Hidden=1
StringAlign=Right
SolidColor=0, 0, 0, 60
Text="<"
LeftMouseDownAction=!Execute [!RainmeterHideMeter CpuTempMinShow1][!RainmeterHideMeter CpuTempMaxShow1][!RainmeterShowMeter CPU1Graph1][!RainmeterShowMeter CPU1Graph2][!RainmeterShowMeter CPU1°][!RainmeterShowMeter PageLeft][!RainmeterHideMeter PageRight][!RainmeterRedraw]

;################
; CPU1 Display
;################

[CpuTemp1]
Measure=Plugin
Plugin=Plugins\SpeedFanPlugin.dll
SpeedFanType=TEMPERATURE
SpeedFanNumber=6
MinValue=#MinValue#
MaxValue=#MaxValue#

[CPU1Graph1]
Meter=Bar
MeasureName=CpuTemp1
BarColor=#BarColor02#
BarOrientation=#BarOrientation#
SolidColor=#BarSolidColor#
X=0
Y=18r
H=#BarHeight#
W=#BarWidth#

[CPU1Graph2]
Meter=Bar
MeasureName=CpuTemp1
BarColor=#BarColor03#
BarOrientation=#BarOrientation#
SolidColor=#BarSolidColor#
X=0
Y=5r
H=#BarHeight#
W=#BarWidth#

[CPU1Text]
Meter=STRING
x=100
Y=-6r
FontFace=#FontName#
FontSize=#FontSize#
FontColor=#FontRGB#
StringStyle=Bold
AntiAlias=1
StringAlign=Center
Text="#0"

[CPU1°]
MeasureName=CpuTemp1
Meter=STRING
X=200
Y=0r
FontFace=#FontName#
FontSize=#FontSize#
FontColor=#FontRGB#
AntiAlias=1
StringAlign=Right
NumOfDecimals=1
Text="%1°C"

;### Min and Max CPU1 Test###

[Switch]
Measure=Calc
Formula=0 < CpuTemp1 ? 1 : 0
IfAboveValue=0
IfAboveAction=!RainmeterSetVariable m <

[CpuTempMin1]
Measure=Calc
Formula=CpuTempMin1 #m# CpuTemp1 ? CpuTempMin1 : CpuTemp1
DynamicVariables=1

[CpuTempMax1]
Measure=Calc
Formula=CpuTempMax1 > CpuTemp1 ? CpuTempMax1 : CpuTemp1

[CpuTempMinShow1]
MeasureName=CpuTempMin1
Meter=String
Text="%1°C"
FontSize=8
AntiAlias=1
X=0
Y=40
Hidden=1
StringAlign=Left
FontFace=#FontName#
FontSize=#FontSize#
FontColor=#FontRGB#
DynamicVariables=1
NumOfDecimals=1

[CpuTempMaxShow1]
MeasureName=CpuTempMax1
Meter=String
Text="%1°C"
FontSize=8
AntiAlias=1
X=200
Y=40
Hidden=1
StringAlign=Right
FontFace=#FontName#
FontSize=#FontSize#
FontColor=#FontRGB#
DynamicVariables=1
NumOfDecimals=1
EDIT: don't worry about (x,y) position of some strings, it's just because it's an extract of the total skin =)
EDIT2: I edit a code issue over
User avatar
kenz0
Developer
Posts: 263
Joined: July 31st, 2009, 2:23 pm
Location: Tokyo, JPN

Re: Hide and Show issues: disapeearing strings

Post by kenz0 »

This issue must already have been fixed.
Try updating to 1.2 if you are using Rainmeter1.1 or older.
.
Image
MatteoFlash
Posts: 23
Joined: June 26th, 2010, 8:11 am

Re: Hide and Show issues: disapeearing strings

Post by MatteoFlash »

I'm using Rainmeter v 1.2 rev 369 (32-bit) [Build on 07 April 2010] and I have Windows 7 64-bit.
Do you think it'd be better if I try the 64-bit version of Rainmeter?

EDIT: I've just followed your suggestion, I updated to a newer (June) 1.2 version of the app and it worked! Thanks a lot :D