Just trying out this to see if it is possible to toggle a config by R-click action:
RightMouseUpAction=[!ToggleConfig #CURRENTPATH# "m#CURRENTSECTION#Name"]
Tried so many variations. The only thing that actually does anything is #CURRENTCONFIG# but that just disables the whole skin instead of toggling the selected file.
What am I doing wrong?
It is currently September 8th, 2024, 12:08 am
FileView skin: ToggleConfig CurrentFile
-
- Posts: 1600
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
FileView skin: ToggleConfig CurrentFile
57686174 77696C6C 6265 77696C6C 6265
-
- Rainmeter Sage
- Posts: 5502
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: FileView skin: ToggleConfig CurrentFile
To activate (or Toggle) a skin, you use the ConfigName (not the #CurrentPath#") followed with the skin.ini name.sl23 wrote: ↑July 3rd, 2024, 11:36 pm Just trying out this to see if it is possible to toggle a config by R-click action:
RightMouseUpAction=[!ToggleConfig #CURRENTPATH# "m#CURRENTSECTION#Name"]
Tried so many variations. The only thing that actually does anything is #CURRENTCONFIG# but that just disables the whole skin instead of toggling the selected file.
What am I doing wrong?
In your bang, "m#CURRENTSECTION#Name" must resolve to a valid skin.ini name in the folder specified by #CurrentConfig#.
Since it probably did not find a valid skin in the #CurrentConfig#, it then toggled (unloaded) the current skin.ini in that folder.
Note, only 1 skin.ini in the #CurrentConfig# folder can be active at any time; that is why the !ToggleConfig bang unloaded the current skin in that folder.
See the 3rd paragraph here for how to find the correct ConfigName.
A quick way to see the Configname is to open the context menu and look at the top line, that is the ConfigName. The bang to toggle this skin (clock.ini) would be:
RightMouseUpAction=[!ToggleConfig "illustra\Clock" "clock.ini"]
You do not have the required permissions to view the files attached to this post.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 16499
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: FileView skin: ToggleConfig CurrentFile
Similar question, (almost the) same mistake by you: https://forum.rainmeter.net/viewtopic.php?p=225120#p225120
Besides eclectric-tech's reply, try to understand that Config is not same as its path. These are different things: Config is just a name, with no path, while CurrentPath is the path of current config, starting with a drive letter and ending with the name of the config (in which you are using this variable). Don't mix them up.
-
- Posts: 1600
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: FileView skin: ToggleConfig CurrentFile
Thanks for your replies and explaining. ![Smiler :)](./images/smilies/ab.gif)
I know I asked about a similar thing, this is somewhat different. I am using the file view plugin and created a skin that defaults to the #skinspath#. I don't want to toggle that skin or even a skin within that config path, although that may be wanted.
My aim was to create a generic skin loader using the file view plugin. So, starting at the skinspath, I can go to any folder within it, R-click a skin file to toggle it.
Am I able to do such a thing?
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
![Smiler :)](./images/smilies/ab.gif)
I know I asked about a similar thing, this is somewhat different. I am using the file view plugin and created a skin that defaults to the #skinspath#. I don't want to toggle that skin or even a skin within that config path, although that may be wanted.
My aim was to create a generic skin loader using the file view plugin. So, starting at the skinspath, I can go to any folder within it, R-click a skin file to toggle it.
Am I able to do such a thing?
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
57686174 77696C6C 6265 77696C6C 6265
-
- Posts: 1600
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: FileView skin: ToggleConfig CurrentFile
So are you saying the only thing I can use for the Config part of the bang is #CurrentConfig# or the equivalent "folder/folder" names?
Will nothing else work?
So:
RightMouseUpAction=[!ToggleConfig #CurrentConfig# "m#CURRENTSECTION#Name"]
Or:
RightMouseUpAction=[!ToggleConfig "illustro\Clock" "m#CURRENTSECTION#Name"]
Is it the same for the File part of the bang? Or is what I'm using ok? That variable does work for other parts of the skin as it's used throughout. But I'm assuming this won't ever work because the Config part won't accept any other values.
As you are browsing through folders within the main Skins folder, obviously the path changes, depending what config you want to load. So it's variable. But there's seems to be a limitation on what can be used here.
Will nothing else work?
So:
RightMouseUpAction=[!ToggleConfig #CurrentConfig# "m#CURRENTSECTION#Name"]
Or:
RightMouseUpAction=[!ToggleConfig "illustro\Clock" "m#CURRENTSECTION#Name"]
Is it the same for the File part of the bang? Or is what I'm using ok? That variable does work for other parts of the skin as it's used throughout. But I'm assuming this won't ever work because the Config part won't accept any other values.
As you are browsing through folders within the main Skins folder, obviously the path changes, depending what config you want to load. So it's variable. But there's seems to be a limitation on what can be used here.
57686174 77696C6C 6265 77696C6C 6265
-
- Rainmeter Sage
- Posts: 8030
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: FileView skin: ToggleConfig CurrentFile
Yes, it's possible. Whether you're able to do it, that's a question only you can answer, but here's how to do it:
Just create 2 FileView child measures having Type=FilePath in them for the file you're currently (with the Index) on, then (Regexp) Substitute the 1st measure output to get the 1st parameter for !ToggleConfig, and the 2nd measure output to get the 2nd parameter for !ToggleConfig.
Then, actually use the values of those 2 measures in the said bang as parameters, wherever you need.
When substituting, first replace (?:^#SKINSPATH#|^.*$) in the input string with nothing aka "" to delete everything but the last path part (this will delete the whole path if you're not in the skins path folder, by the way), from which you can then extract the ConfigName and the FileName parts to use as parameters for the bang, respectively, in a second Substitute part. After all, it's only the last escaped backslash aka \\ that's separating them now. You might also want to add "^\\\d+$":"" at the end of the Substitute in case you get literals like \1 or \2 since Rainmeter has the habit of replacing empty capture references with the said literals, see the Note from the RegExpSubstitute entry in the manual:
https://docs.rainmeter.net/manual/measures/general-options/substitute/
-
- Posts: 1600
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: FileView skin: ToggleConfig CurrentFile
Ok, I don't get it.
I created two measures with Type=FilePath, even though I see the need for only one, but I made two.
Your RegEx substitutes don't work, but that's probably cause I've done it wrong, I know that much!
Been trying to figure it out for hours now and the closest I can get is to toggle the first item in the folder, not the one I'm R-clicking on. So if I click on Index5 or Index2 or Index 9, it toggles Index1 only.
Everything else works as it should. I just can't get this thing to work. Here's my code, but I had to use my own Substitutes to get this far as yours wouldn't do anything.
I then managed to get this code to work, not quite how I want it to, as it would be better if you could click skin1 to load it, then click skin2, a variant, and unload skin1 at the same time you load skin2. My code also has an issue with opening the folder when hovering the path now that I removed "Skins\" from mPath using Substitute. But that was the only way I could get the path.
Please help!
Thanks.![Thumbs Up :thumbup:](./images/smilies/ay.gif)
I created two measures with Type=FilePath, even though I see the need for only one, but I made two.
Your RegEx substitutes don't work, but that's probably cause I've done it wrong, I know that much!
![Sly :sly:](./images/smilies/do.gif)
Been trying to figure it out for hours now and the closest I can get is to toggle the first item in the folder, not the one I'm R-clicking on. So if I click on Index5 or Index2 or Index 9, it toggles Index1 only.
Everything else works as it should. I just can't get this thing to work. Here's my code, but I had to use my own Substitutes to get this far as yours wouldn't do anything.
I then managed to get this code to work, not quite how I want it to, as it would be better if you could click skin1 to load it, then click skin2, a variant, and unload skin1 at the same time you load skin2. My code also has an issue with opening the folder when hovering the path now that I removed "Skins\" from mPath using Substitute. But that was the only way I could get the path.
Please help!
![Shocked O.O](./images/smilies/ai.gif)
Thanks.
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
57686174 77696C6C 6265 77696C6C 6265
-
- Rainmeter Sage
- Posts: 5502
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: FileView skin: ToggleConfig CurrentFile
To open variants in the [sIcon] section, use !ActivateConfig with just the ConfigName parameter:sl23 wrote: ↑July 5th, 2024, 8:56 pm {clip}
I then managed to get this code to work, not quite how I want it to, as it would be better if you could click skin1 to load it, then click skin2, a variant, and unload skin1 at the same time you load skin2. My code also has an issue with opening the folder when hovering the path now that I removed "Skins\" from mPath using Substitute. But that was the only way I could get the path.
Please help!![]()
Thanks.
{code clipped}
RightMouseUpAction=[!ActivateConfig [mPath]]
instead of RightMouseUpAction={!ToggleConfig [mPath] "#File#"].
To unload the current variant, use a MiddleMouseUpAction and !DeactivateConfig with the current ConfigName:
MiddleMouseUpAction=[!DeactivateConfig [mPath]]
Note: You will need to remove, or comment out, the MiddleMouseUpAction in the [bg] section that refreshes in order for the added deactivate to work.
I did not experience the other issue of opening the folder on hover...
Modified [sIcon] code to load variants and deactivate:
Code: Select all
[sIcon]
AntiAlias=1
ImageAlpha=65
Hidden=1
Group=Icon
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure m#CURRENTSECTION# "FollowPath"][!UpdateMeasure mPath][!UpdateMeasureGroup Children][!SetOption Name Text "[mName]"][!UpdateMeter *][!Redraw]
RightMouseUpAction=[!ActivateConfig [mPath]]
; "#File#"]
MiddleMouseUpAction=[!DeactivateConfig [mPath]]
MouseOverAction=[!SetOption #CURRENTSECTION# ImageAlpha "255"][!SetOption mR1 Index "#CURRENTSECTION#"][!UpdateMeasure mR1][!SetOption mName Index "#CURRENTSECTION#"][!UpdateMeasure mName][!SetVariable File "[mName].ini"][!SetOption Name Text "[mName]"][!ShowMeterGroup Name][!UpdateMeter Name][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# ImageAlpha ""][!SetOption mR1 Index ""][!UpdateMeasure mR1][!SetVariable File ""][!SetOption mName Index ""][!UpdateMeasure mName][!SetVariable File ""][!SetOption Name Text ""][!HideMeterGroup Name][!UpdateMeter Name][!UpdateMeter *][!Redraw]
X=25r
Y=r
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 1600
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: FileView skin: ToggleConfig CurrentFile
Thanks for your help.
Those Mouse actions worked. Was hoping to get it all on one Mouse button, but that's probably not possible with the way it works. But I'm ok with how it is, that's great, thanks.
Wrt the hover path, sorry it was late, I was really tired. I meant when hovering, I can't L-click the path due to using the Substitute to egt the path for use in the above Mouse actions. FIXED.
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
Those Mouse actions worked. Was hoping to get it all on one Mouse button, but that's probably not possible with the way it works. But I'm ok with how it is, that's great, thanks.
Wrt the hover path, sorry it was late, I was really tired. I meant when hovering, I can't L-click the path due to using the Substitute to egt the path for use in the above Mouse actions. FIXED.
Last edited by sl23 on July 6th, 2024, 6:02 pm, edited 1 time in total.
57686174 77696C6C 6265 77696C6C 6265
-
- Posts: 1600
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: FileView skin: ToggleConfig CurrentFile
One last thing I would like to do, though not essential, is to limit this skins ability to go back past the Skins folder. It opens on the Skins folder and is designed only for use within that folder, but how can I restrict going up past it?
I have tried disabling the Mouse action for going back but that didn't work. Any ideas?![Smiler :)](./images/smilies/ab.gif)
I have tried disabling the Mouse action for going back but that didn't work. Any ideas?
![Smiler :)](./images/smilies/ab.gif)
57686174 77696C6C 6265 77696C6C 6265