It is currently May 21st, 2024, 6:00 pm

(SOLVED)Counter

Get help with creating, editing & fixing problems with skins
User avatar
cedric115
Posts: 26
Joined: April 16th, 2012, 1:29 am

(SOLVED)Counter

Post by cedric115 »

Hi my counter do not work i dont know why :?

Code: Select all

[Variables]
MaxNumber=2000
Pause=0
@Include=#CURRENTPATH#SETTINGS\Variables.inc

[cCounter]
Measure=Calc
Formula=(cCounter+#Pause#)%(#MaxNumber)
IfEqualValue=#MaxNumber#
IfEqualAction=!Execute [!SetVariable Pause 0][!ShowFade #CURRENTCONFIG#]


[Rainmeter]
Update=100
Author=José Pardilla (Edited by : Cédric Lampron)
DynamicWindowSize=1



[ColorStyle]
ColorMatrix1=1.438;-0.062;-0.062;0;0
ColorMatrix2=-0.122;1.378;-0.122;0;0
ColorMatrix3=-0.016;-0.016;1.483;0;0
ColorMatrix5=-0.03;0.05;-0.02;0;

[Icon]
Meter=Image
X=10
Y=10
Imagename=#ROOTCONFIGPATH#/Icons/Diablo III
MouseOverAction=!SetOption Icon MeterStyle ColorStyle
MouseLeaveAction=!SetOption Icon MeterStyle ""
LeftMouseDownAction=!SetOption Icon MeterStyle ""
LeftMouseUpAction=!Execute [!SetOption Icon MeterStyle ColorStyle][PLAY "#CURRENTPATH#Sound\Click.wav"][!HideFade #CURRENTCONFIG#]["#Game#"][!SetVariable Pause 1]
Any suggestion? :rosegift:
Last edited by cedric115 on April 16th, 2012, 6:49 pm, edited 2 times in total.
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Counter

Post by jsmorley »

Code: Select all

[cCounter]
Measure=Calc
Formula=((cCounter+#Pause#)%(#MaxNumber#)) + 1
User avatar
cedric115
Posts: 26
Joined: April 16th, 2012, 1:29 am

Re: Counter

Post by cedric115 »

many thx what is the sybtax to use a updatedivider if i want an 1 sec update

my rainmeter update is 100 so every 10?
User avatar
cedric115
Posts: 26
Joined: April 16th, 2012, 1:29 am

Re: Counter

Post by cedric115 »

my Show fade do not work :confused:

Code: Select all

[cCounter]
Measure=Calc
Formula=(cCounter+#Pause#)%(#MaxNumber)
IfEqualValue=#MaxNumber#
IfEqualAction=!Execute [!SetVariable Pause 0][!ShowFade #CURRENTCONFIG#]
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Counter probleme

Post by smurfier »

The problem is with the math used by your counter. If you do not add 1 to your MaxNumber, then it will never reach MaxNumber as this is how Remainder Division works.

Code: Select all

[cCounter]
Measure=Calc
Formula=(cCounter+#Pause#)%(#MaxNumber#+1)
IfEqualValue=#MaxNumber#
IfEqualAction=!Execute [!SetVariable Pause 0][!ShowFade #CURRENTCONFIG#]
The way you should really be doing this though.

Code: Select all

[cCounter]
Measure=Calc
Formula=cCounter+1
IfEqualValue=#MaxNumber#
IfEqualAction=!Execute [!DisableMeasure #CURRENTSECTION#][!ShowFade #CURRENTCONFIG#]
Disabled=1
Then use !EnableMeasure cCounter to active the counter.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Counter

Post by jsmorley »

#MaxNumber

Must be

#MaxNumber#

I already fixed that once in my post... Take your time and check things.
User avatar
cedric115
Posts: 26
Joined: April 16th, 2012, 1:29 am

Re: Counter

Post by cedric115 »

jsmorley i fix it in my code copy paste error sorry

Code: Select all

[Metadata]
Name=Diablo 3 Launcher
Config=Diablo3Launcher
Description=Diablo 3 Icon Pack
Version=1.0
License=Creative Commons BY-NC-SA 3.0

[Variables]
MaxNumber=2001
Pause=0
@Include=#CURRENTPATH#SETTINGS\Variables.inc


; General & Frame ----------------------------------------
; --------------------------------------------------------

[Style]
AntiAlias=1

[Wrapper]
Meter=Image
SolidColor=0,0,0,1
X=0
Y=0
H=276
W=276
; Counter-------------------------------------------------
; --------------------------------------------------------

[cCounter]
Measure=Calc
Formula=cCounter+1
IfEqualValue=#MaxNumber#
IfEqualAction=!Execute [!DisableMeasure #CURRENTSECTION#][!ShowFade #CURRENTCONFIG#]
Disabled=1

; Icon ---------------------------------------------------
; --------------------------------------------------------

[Rainmeter]
Update=100
Author=José Pardilla (Edited by : Cédric Lampron)
DynamicWindowSize=1

[ColorStyle]
ColorMatrix1=1.438;-0.062;-0.062;0;0
ColorMatrix2=-0.122;1.378;-0.122;0;0
ColorMatrix3=-0.016;-0.016;1.483;0;0
ColorMatrix5=-0.03;0.05;-0.02;0;

[Icon]
Meter=Image
X=10
Y=10
Imagename=#ROOTCONFIGPATH#/Icons/Diablo III
MouseOverAction=!SetOption Icon MeterStyle ColorStyle
MouseLeaveAction=!SetOption Icon MeterStyle ""
LeftMouseDownAction=!SetOption Icon MeterStyle ""
LeftMouseUpAction=!Execute [!SetOption Icon MeterStyle ColorStyle][PLAY "#CURRENTPATH#Sound\Click.wav"][!HideFade #CURRENTCONFIG#]["#Game#"][!EnableMeasure cCounter]
What i want is after 5s from his !hideFade from the MouseUp i want to Fade the same skin In
For now im just trying to fadeIn again and after ill care about the UpdateDivider but for now nothing work =(
User avatar
cedric115
Posts: 26
Joined: April 16th, 2012, 1:29 am

Re: Counter

Post by cedric115 »

OK i find it thx for your help
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Counter

Post by jsmorley »

Good. I tried your last version and it seemed to work fine for me, other than needing to change the counter maximum if you want it to only hide for 5 seconds. Right now it is hiding for more like 2 minutes.

You are getting the hang of it. I'm impressed that you were able to take a pretty unhelpful "read the manual" response on your initial question about how to time an action, and got very close on the first try.

Keep playing, you will be an expert in no time.