It is currently April 19th, 2024, 6:49 pm

Activating another skin

Get help with creating, editing & fixing problems with skins
Kureshai
Posts: 22
Joined: January 18th, 2016, 9:54 pm

Activating another skin

Post by Kureshai »

Hello.
I'm having a few difficulties with a certain command.

LeftMouseUpAction =[!Move "0" "48"][!ActivateConfig "Vertical Line" "Vertical Line.ini"]
LeftMouseDownAction=[!Move "0" "-48"][!DeactivateConfig "Vertical Line" "Vertical Line.ini"]

What I am trying to do is to have the active skin to move down 48 pixels, which works by the way, but in addition I also want it to activate a second skin as it moves. The next left click it moves back to its original place and there I want it to deactivate the other skin.
How I interpret [!ActivateConfig "Vertical Line" "Vertical Line.ini"] is that it will try to activate the specific ini file in the folder Vertical Line, but somehow it won't activate or deactivate the skin. Vertical Line is just a placeholder until I make the rest. :)

Anyone able to tell me what I am doing wrong?
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Activating another skin

Post by fonpaolo »

I really hope that your two "LeftMouse" Actions are positioned on different meters...

Keep in mind that if you're using them together (on the same meter/image/whatever) your commands are fired one after the other and they can't do anything, since they're fired almost simultaneously.

Better if you use two meters and use LeftMouseUpAction* in both, with a different command for everyone.

* note: if you use LeftMouseDownAction with background or an image with skin dimensions, then you can't move the skin.
User avatar
balala
Rainmeter Sage
Posts: 16145
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Activating another skin

Post by balala »

And another comment I have: if those two mouse actions are used on the same meter (undesirable, as fonpaolo said), first will be executed the LeftMouseDownAction (when you press the button), which will try to deactivate the skin, then the LeftMouseUpAction (when you release the button), which will try to activate the skin. So, initially the Vertical Line\Vertical Line.ini should be activated, otherwise you'll get a warning in the log. But even so, the deactivating then immediately reactivating the skin is not a good idea (as also fonpaolo said). In best case, you'll see just a short flash.
And although the !DeactivateConfig bang is working as you wrote it, in reality, the following form is desired: [!DeactivateConfig "Vertical Line"], so you don't need to specify the ini file, as !DeactivateConfig will deactivate the loaded ini file from the Vertical Line config.
Kureshai
Posts: 22
Joined: January 18th, 2016, 9:54 pm

Re: Activating another skin

Post by Kureshai »

As I said - The movement works just as it is supposed to work. When I click it once, it goes down. When it click it again it goes back up. It's the other thing where I am in doubt. I Want it to Activate another skin when it moves down, and then deactivate it when it moves back up.

Changed it to
LeftMouseUpAction =[!Move "0" "48"][!ActivateConfig "Vertical Line" "Vertical Line.ini"]
RightMouseUpAction =[!Move "0" "-48"][!DeactivateConfig "Vertical Line"]
But it doesn't activate nor deactivates the Vertical Line skin.
Last edited by Kureshai on January 21st, 2016, 7:37 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16145
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Activating another skin

Post by balala »

Kureshai wrote:As I said - The movement works just as it is supposed to work. When I click it once, it goes down. When it click it again it goes back up. It's the other thing where I am in doubt. I Want it to Activate another skin when it moves down, and then deactivate it when it moves back up.
It should work. Doesn't? Although that's not a big problem, as I said, try to replace the [!DeactivateConfig "Vertical Line" "Vertical Line.ini"] bang of the LeftMouseDownAction with [!DeactivateConfig "Vertical Line"].
And if you're using the LeftMouseDownAction and LeftMouseUpAction on two different meters, do you have a good reason to not use on both a LeftMouseUpAction? As fonpaolo said, LeftMouseDownAction will disable the possibility to move the skin (read this).
Kureshai
Posts: 22
Joined: January 18th, 2016, 9:54 pm

Re: Activating another skin

Post by Kureshai »

Changed it to
LeftMouseUpAction =[!Move "0" "48"][!ActivateConfig "Vertical Line" "Vertical Line.ini"]
RightMouseUpAction =[!Move "0" "-48"][!DeactivateConfig "Vertical Line"]
But it doesn't activate nor deactivates the Vertical Line skin.
User avatar
balala
Rainmeter Sage
Posts: 16145
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Activating another skin

Post by balala »

Please post the whole code of the skin.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Activating another skin

Post by fonpaolo »

Just to be sure, since in your first post you said "Vertical Line is just a placeholder until I make the rest", Kureshai:
does this "placeholder" contains at least one measure or a meter, or it's only an empty file?
Kureshai
Posts: 22
Joined: January 18th, 2016, 9:54 pm

Re: Activating another skin

Post by Kureshai »

This is the whole
[Rainmeter]
Update=1000

[TopPanel]
Meter=Image
X=
Y=
ImageName=Images\Top Panel.png
ImageAlpha=150
AntiAlias=1

[Games Folder]
Meter=Image
X=1233
y=1
H=44
ImageName=Images\Games Folder.png
ImageAlpha=200
AntiAlias=1
LeftMouseUpAction =[!Move "0" "48"][!ActivateConfig "Vertical Line\Vertical Line" "Vertical Line.ini"]
RightMouseUpAction =[!Move "0" "-48"][!DeactivateConfig "Vertical Line"]


[CLOCK]

[MeasureTime]
Measure=Time
Format=%D %H:%M

[MeterTime]
MeasureName=MeasureTime
Meter=STRING
X=2560
Y=24
FontColor=255,255,255,150
FontSize=26
FontFace=Advent Pro
StringAlign=RightCenter
StringStyle=Normal
AntiAlias=1

[RecycleBin]

[Variables]
NormalAlpha=200
HoverAlpha=255

[MeasureBin]
Measure=Plugin
Plugin=RecycleManager.dll
Drives=ALL
RecycleType=COUNT

[MeasureSize]
Measure=Plugin
Plugin=RecycleManager.dll
Drives=ALL
RecycleType=SIZE

[MeterBinEmpty]
Meter=Image
Imagename=Images\RecycleBin Empty.png
ImageAlpha=200
X=0
Y=2
Hidden=0
LeftMouseUpAction =!execute [::{645FF040-5081-101B-9F08-00AA002F954E}]

[MeterBinFull]
Meter=Image
Imagename=Images\RecycleBin Full.png
ImageAlpha=200
X=r
Y=r
Hidden=1
RightMouseDownAction =!execute [!RainmeterPluginBang "MeasureBin EmptyBin"]
LeftMouseUpAction =!execute [::{645FF040-5081-101B-9F08-00AA002F954E}]


[BinAction]
Measure=Calc
Formula=MeasureBin
IfAboveAction=!execute [!RainmeterHideMeter MeterBinEmpty][!RainmeterShowMeter MeterBinFull]
IfAboveValue=0
IfEqualAction=!execute [!RainmeterHideMeter MeterBinFull][!RainmeterShowMeter MeterBinEmpty]
IfEqualValue=0

[MeasureCPU]
Measure=CPU

[MeterCPUPercent]
Meter=String
MeasureName=MeasureCPU
FontFace=Advent Pro
FontSize=13
FontColor=255,255,255,200
X=2325
Y=4
StringAlign=Center
StringStyle=Bold
AntiAlias=1
Text=CPU %1%

[MeasureRAM]
Measure=PhysicalMemory

[MeterRAMPercent]
Meter=String
MeasureName=MeasureRAM
FontFace=Advent Pro
FontSize=13
FontColor=255,255,255,200
X=2325
Y=19
StringAlign=Center
StringStyle=Bold
AntiAlias=1
Text=RAM %1%
Percentual=1
And this is what I want to activate
[Vertical Line]
Meter=Image
X=1280
Y=0
ImageName=Straight 2p lines vertical.png
ImageAlpha=150
AntiAlias=1
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Activating another skin

Post by fonpaolo »

Well... for what i see, or you have a very large display, or your skin has already some problems:

Code: Select all

[MeterTime]
...
X=2560 ?
...
:uhuh:

Then, don't use !Execute and !Rainmeter, they're very old commands and are deprecated.