Hello,
Im new to Rainmeter and i would like to ask if there is any easy way to block activating of skins or groups.
I want to make a Button or Image that would toggle blocking by leftclicking.
It is currently March 29th, 2024, 10:07 am
Blocking skins or groups
-
- Posts: 11
- Joined: May 11th, 2017, 9:24 am
Blocking skins or groups
Last edited by DaThomas on May 12th, 2017, 1:59 pm, edited 1 time in total.
-
- Posts: 860
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Blocking skins or groups
Something like this
Code: Select all
LeftMouseUpAction=[!ToggleConfig "Skinfolder\skinname" "skin.ini"]
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Posts: 11
- Joined: May 11th, 2017, 9:24 am
Re: Blocking skins or groups
Im not sure if that Is what im looking for, i read that toggleconfig activates or deactivates configs..., but i want to click on an image and that would block activating skin1 even if i clicked on yet another image that activates skin1.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Blocking skins or groups
I don't think there would be a very simple such kind of possibility. The only one I can imagine would be to remove the LeftMouseupAction option of the button which normally activates the skin when you click the first button (image or whatever), then add it back. Not too simple, but I think it could work.
Do you know how to do this?
Do you know how to do this?
-
- Posts: 11
- Joined: May 11th, 2017, 9:24 am
Re: Blocking skins or groups
No, i don't know how to do that, could you please show it to me?
-
- Posts: 860
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Blocking skins or groups
Do you have any code written for what your are trying to do? If so post it so we can take a look at it.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Posts: 11
- Joined: May 11th, 2017, 9:24 am
Re: Blocking skins or groups
Im sorry. I don't have any code to that part yet, right now im struggling with making images for it.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Blocking skins or groups
Ok, here is a small code, please give it a try:DaThomas wrote:No, i don't know how to do that, could you please show it to me?
Code: Select all
[Rainmeter]
Update=1000
[Variables]
Lock=0
[MeasureLock]
Measure=Calc
Formula=#Lock#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!SetOption MeterConfig LeftMouseUpAction """[!ToggleConfig "ControlledConfig" "ControlledINI.ini"]"""][!SetOption MeterLock Text "Lock"][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption MeterConfig LeftMouseUpAction ""][!SetOption MeterLock Text "Unlock"][!UpdateMeter *][!Redraw]
DynamicVariables=1
[MeterLock]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=14
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
LeftMouseUpAction=[!SetVariable Lock "(1-#Lock#)"][!UpdateMeasure "MeasureLock"][!UpdateMeter "#CURRENTSECTION#"]
[MeterConfig]
Meter=STRING
X=0r
Y=5R
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=14
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Toggle
Using such Calc measures to control something in the skin has the great advantage that you can control more things with one single variable: in this case we're controlling / changing the text of the [MeterLock] meter AND the LeftMouseUpAction of the [MeterConfig] meter.
What you have to be careful is to replace the ControlledConfig and ControlledINI.ini config, respectively file name, with the needed ones. I used some generic names, but obviously you'll have to use those ones which are needed.
I hope I succeeded explaining the whole proces. It's not too hard to be understood, especially if you've get used to use some variables to control more things once.
Please let me know if you could adapt this code to your needs. If you didn't, please post the code you have so far, to can take a look and can give specific help, in that concrete situation.
EDIT: I just read you don't have any code so far. I hope you'll be able to adapt my code.
-
- Posts: 11
- Joined: May 11th, 2017, 9:24 am
Re: Blocking skins or groups
Thanks for the code ! This is the first time i came across Measures so it took a while until i understood it, im only not sure which meter is being updeted by [!UpdateMeter *] in IfActions. I tryed my best, but after i adapted this code it stopped working.
When i lock it, everything is fine, but when i try to unlock it, it won't unlock, it won't put in the UNLOCKED variable so i must have done something wrong and i can't find it.
When i lock it, everything is fine, but when i try to unlock it, it won't unlock, it won't put in the UNLOCKED variable so i must have done something wrong and i can't find it.
Code: Select all
[Rainmeter]
Update=1000
[Variables]
MeterLockImgPath=#@#\LockButton.png
LauncherImgPath=#@#\Kirito.png
LauncherPath=E:\Tom
UNLOCKED=[!ActivateConfig "Kirito Launcher\Sidebars\right" "right.ini"][!ActivateConfig "Kirito Launcher\Deactivator" "Deactivator.ini"]
LOCKED=[!ActivateConfig "Kirito Launcher\Sidebars\left" "left.ini"][!ActivateConfig "Kirito Launcher\Deactivator" "Deactivator.ini"]
Lock=0
[Background]
Meter=IMAGE
SolidColor=111,111,111,0
W=350
H=150
[MeasureLock]
Measure=Calc
Formula=#Lock#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!SetOption MeterLauncher LeftMouseUpAction """#UNLOCKED#"""][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption MeterLauncher LeftMouseUpAction """#LOCKED#"""][!UpdateMeter *][!Redraw]
DynamicVariables=1
[MeterLock]
Meter=IMAGE
ImageName=#MeterLockImgPath#
AntiAlias=1
LeftMouseUpAction=[!SetVariable Lock "(1-#Lock#)"][!UpdateMeasure "MeasureLock"][!UpdateMeter "#CURRENTSECTION#"]
[MeterLauncher]
Meter=Image
ImageName=#LauncherImgPath#
X=210
Y=92
AntiAlias=1
MiddleMouseUpAction=["#LauncherPath#"]
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Blocking skins or groups
All meters of the current code. As same as in Windows, * means everything (all meters).DaThomas wrote:im only not sure which meter is being updeted by [!UpdateMeter *] in IfActions.
Sorry, no, you did nothing wrong, that's my fault. I forgot to add a DynamicVariables=1 option to the [MeterLock] meter. Please add it and try again the skin.DaThomas wrote:I tryed my best, but after i adapted this code it stopped working.
When i lock it, everything is fine, but when i try to unlock it, it won't unlock, it won't put in the UNLOCKED variable so i must have done something wrong and i can't find it.