It is currently April 20th, 2024, 6:11 am

[solved]1 meter,2 problems.

Get help with creating, editing & fixing problems with skins
User avatar
Jkon
Posts: 185
Joined: December 4th, 2009, 2:05 am

[solved]1 meter,2 problems.

Post by Jkon »

Hello all,having a problem with dynamicvariables and imagerotate in a meter.The following code is taken from a skin i'm working on.The problem is with the meter [Charging]

Code: Select all

[Variables]

Hide01=[!RainmeterShowMeter Charging] [!RainmeterHideMeter BatteryValue] [!RainmeterHideMeter Mhz]
Hide02=[!RainmeterHideMeter Charging] [!RainmeterShowMeter BatteryValue] [!RainmeterShowMeter Mhz]

; ====================

; [Measures]

[mCounter]
Measure=Calc
Formula=Counter %2
IFBelowValue=1
IfBelowAction=!RainmeterSetvariable Angle 0
IfAboveValue=0
IfAboveAction=!RainmeterSetvariable Angle 60

[mStatus]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=STATUS
IfEqualValue=1
IfEqualAction=!Execute #Hide01#
IFBelowValue=1
IfBelowAction=!Execute #Hide02#
IfAboveValue=1
IfAboveAction=!Execute #Hide02#

; ====================

; [Meters]

[BatteryValue]
Meter=string
Meterstyle=Text
Measurename=mBattery+
X=50
Y=27
W=60
H=15
Percentual=1
Postfix=%

[MHZ]
Meter=String
MeterStyle=Text
MeasureName=mMHZ
X=r
Y=1R
W=80
H=15
FontSize=#Size05#
PostFix=mhz

[Charging]
Meter=Image
ImageName=Battery Pod.png
ImageTint=#Tint#
ImageRotate=#Angle#
X=17
Y=17
Hidden=1
DynamicVariables=1
The first problem is I require the meter [charging] to be hidden until called for by the variable #Hide01# in the measure [mStatus] i require dynamicvariables set to 1 for the dynamicvariable #Angle# to function but this is preventing #Hide01# from showing the meter [Charging] and if i change hidden=1 to 0 the variable #hide01# works fine.I dont know why dynamicvariables=1 is interacting with hidden=1.

The second problem is if I change hidden=1 to 0 just to see the meters image,when the variable #angle# changes the image moves down due to it now being of greater hight and still at a y=17 position.Is it possible to set the meter to autocrop the image or some way of anchoring the image.

Sorry,I am really bad at explaining things.I've uploaded the skin if that helps.Any help greatly appreciated.
You do not have the required permissions to view the files attached to this post.
Last edited by Jkon on April 10th, 2010, 5:10 pm, edited 1 time in total.
Image
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: 1 meter,2 problems.

Post by jsmorley »

I didn't look closely, but it should be noted up front that Dynamic Variables do not work with any plugins.
User avatar
Jkon
Posts: 185
Joined: December 4th, 2009, 2:05 am

Re: 1 meter,2 problems.

Post by Jkon »

No,i know that,The if values in the plugin measure only trigger the variables #hide01# #hide02# which are just switches and not dynamic.
Image
User avatar
~Faradey~
Posts: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: 1 meter,2 problems.

Post by ~Faradey~ »

[Charging]
Meter=Image
ImageName=Battery Pod.png
ImageTint=#Tint#
ImageRotate=#Angle#
X=17
Y=17
Hidden=1
DynamicVariables=1

Don't know why but "DynamicVariables" and "Hidden" if set to =1 not works together, that is why try this code

Code: Select all

[Variables]

Hide01=[!RainmeterShowMeter Charging] [!RainmeterHideMeter BatteryValue] [!RainmeterHideMeter Mhz]
Hide02=[!RainmeterHideMeter Charging] [!RainmeterShowMeter BatteryValue] [!RainmeterShowMeter Mhz]
HC=1
; ====================

; [Measures]

[mCounter]
Measure=Calc
Formula=Counter %2
IFBelowValue=1
IfBelowAction=!RainmeterSetvariable Angle 0
IfAboveValue=0
IfAboveAction=!RainmeterSetvariable Angle 60

[mStatus]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=STATUS
IfEqualValue=1
IfEqualAction=!Execute [#Hide01#][!RainmeterSetVariable HC 0][!RainmeterRedraw]
IFBelowValue=1
IfBelowAction=!Execute [#Hide02#][!RainmeterSetVariable HC 1][!RainmeterRedraw]
IfAboveValue=1
IfAboveAction=!Execute [#Hide02#][!RainmeterSetVariable HC 1][!RainmeterRedraw]

; ====================

; [Meters]

[BatteryValue]
Meter=string
Meterstyle=Text
Measurename=mBattery+
X=50
Y=27
W=60
H=15
Percentual=1
Postfix=%

[MHZ]
Meter=String
MeterStyle=Text
MeasureName=mMHZ
X=r
Y=1R
W=80
H=15
FontSize=#Size05#
PostFix=mhz

[Charging]
Meter=Image
ImageName=Battery Pod.png
ImageTint=#Tint#
ImageRotate=#Angle#
X=17
Y=17
Hidden=#HC#
DynamicVariables=1
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: 1 meter,2 problems.

Post by Alex2539 »

Hidden=1 works fine with DynamicVariables=1, it's !RainmeterShowMeter and !RainmeterHideMeter that don't work properly. The same goes for !RainmeterEnableMeasure and !RainmeterDisableMeasure.
ImageImageImageImage
User avatar
Jkon
Posts: 185
Joined: December 4th, 2009, 2:05 am

Re: 1 meter,2 problems.

Post by Jkon »

Yes, using the dynamic variable with hidden works,unfortunatly I've had to find a work around for the rotation problem and no longer need the dynamic variable in the meter.That said it's very strange that they would not work together when both set to 1.I'm sure i've used them together before and wonder if it's to do with the new image rotate and image tint commands as i noticed while trying to find a work around that i could not use dynamicvariables to change the value of Imageflip= between "none" and "Horizontal".Thanks for your help faraday.
Image
User avatar
Jkon
Posts: 185
Joined: December 4th, 2009, 2:05 am

Re: 1 meter,2 problems.

Post by Jkon »

Do you mean dont work properly sometimes in general or just in relation to hidden or dynamic variables?
Image
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: 1 meter,2 problems.

Post by Alex2539 »

If you have DynamicVariables=1 set on a meter, you cannot use !RainmeterHideMeter or !RainmeterShowMeter to hide and show it. The same goes for a measure being enabled or disabled.
ImageImageImageImage
User avatar
Jkon
Posts: 185
Joined: December 4th, 2009, 2:05 am

Re: 1 meter,2 problems.

Post by Jkon »

Thank you for pointing that out,I'm sure you have just saved me hours of more needless frustration at some future point.cheers alex.
Image
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: 1 meter,2 problems.

Post by dragonmage »

Alex2539 wrote:If you have DynamicVariables=1 set on a meter, you cannot use !RainmeterHideMeter or !RainmeterShowMeter to hide and show it. The same goes for a measure being enabled or disabled.

Well, isn't that interesting.