It is currently May 17th, 2024, 11:45 pm

Do I need Calc or Counter or...?

Get help with creating, editing & fixing problems with skins
CybOrSpasm
Posts: 146
Joined: January 8th, 2011, 7:12 pm
Location: Tennessee

Do I need Calc or Counter or...?

Post by CybOrSpasm »

This works.. however, I was hoping to be able to "toggle" The "path" variable without using another mouse button... I have read the calc page and the counter tips page over and over again, but it is just beyond me... Here is what works right now, but I want to get rid of the MiddleMouseUpAction, and simply have the LeftMouseUpAction toggle the path.

Code: Select all

[Rainmeter]
Update=1000

####################################

[Variables]
Path=H:\

####################################

[MeasureGetImage]
Measure=Plugin
Plugin=QuotePlugin
PathName=#Path#
FileFilter=*.jpg;*.png
UpdateDivider=30

####################################

[MeterBackground]
Meter=IMAGE
SolidColor=0,0,0
X=48
Y=43
W=218
H=136

[MeterPicture]
Meter=Image
MeasureName=MeasureGetImage
X=48
Y=43
W=218
H=136
PreserveAspectRatio=1

[MeterFrame]
Meter=IMAGE
ImageName=#@#\Picture1-216x134.png
W=324
H=228
MiddleMouseUpAction=[!WriteKeyValue "Variables" "Path" "H:\"][!Refresh]
LeftMouseUpAction=[!WriteKeyValue "Variables" "Path" "c:\Graphics\Pics"][!Refresh]
DynamicVariables=1
I know this is WAY off, but that's the problem, after 2 days of pulling my hair out, I just can't put it together with the code above.

Code: Select all

[Variables]
Toggle=0
Path="C:\Pics"

[MeterChangeFolder]
Measure=Calc
Formula=(#Toggle#+1)
IfEqualValue=1
IfBelowAction=[!WriteKeyValue "Variables" "Path" "H:\Pics"][!Refresh]
IfEqualAction=[!WriteKeyValue "Variables" "Path" "c:\Pics"][!Refresh]
DynamicVariables=1
LeftMouseUpAction=[!SetVariable Toggle=0][!Refresh]
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Do I need Calc or Counter or...?

Post by Kaelri »

The simplest way is to use two variables, and swap the values with your mouse action.

Code: Select all

[Variables]
Path1=C:\Pics
Path2=H:\Pics

Code: Select all

LeftMouseUpAction=[!WriteKeyValue "Variables" "Path1" "#Path2#"][!WriteKeyValue "Variables" "Path2" "#Path1#"][!Refresh]
CybOrSpasm
Posts: 146
Joined: January 8th, 2011, 7:12 pm
Location: Tennessee

Re: Do I need Calc or Counter or...?

Post by CybOrSpasm »

LOL! Story of my life, always making things harder than they have to be! }:] Thanks Kaelri, I will go try it now. };]