It is currently November 29th, 2021, 12:46 pm

Set nested [!SetOption] problem

Help with creating, editing & fixing problems with skins
User avatar
Youkai1977
Posts: 139
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Set nested [!SetOption] problem

Post by Youkai1977 »

Once again I need help from the experts....
It is about the fact that I per [!SetOption] in connection with various variables, which again contain commands to be executed just break my head. :???:
I sit there now for 2 weeks on it and raff it simply not.
Therefore (and the Reallife what needs one) also my sudden radio silence ... to "Yincognito" squint ...at my last problem, what but first still rests...

Well, in (as) short as possible, what it's about:
I'm currently writing a slideshow, which contains a menu with a few standard options (open image etc.).
In this menu there is a button, which should open another (Advanced Menu), and then hide the first menu.
The crux is that now nesting occurs, what should happen when the mouse is over the one, or the other menu. Since the whole thing is then also distributed over the "slideshow.ini" and a "slideshowdata.inc", probably also "Nested variables" come into play.
But now it gets even more crazy, I got it working, it runs as it should, but when I leave the "Advanced Menu" with the mouse, I get errors or hints in the log, which are then e.g. like in the screenshot.

And the 2nd problem in the problem is, since also still another InputText-Plugin is involved, nails me also still purely, in the moment where it is activated, by it me the menu background closes, since I leave this yes (apparently according to syntax) with the mouse, by even the activation of the InputText-Plugin. That is, I seem to be with the mouse then no longer on the background, which contains the variable "variables", which were set by [!SetOption] before.

I do not know therefore just, whether I have made myself so stupid before loud various options test, that I do not see the forest before loud trees any more, or I think simply too complicated, or still worse the Rainmeter syntax have not understood.

Therefore, is there for my problem perhaps a (simple) solution, or do I try here straight from Rainmeter commands to require, which it cannot?

Here the files:
You do not have the required permissions to view the files attached to this post.
User avatar
Active Colors
Moderator
Posts: 916
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Set nested [!SetOption] problem

Post by Active Colors »

Youkai1977 wrote: February 22nd, 2021, 1:39 pm Once again I need help from the experts....
It is about the fact that I per [!SetOption] in connection with various variables, which again contain commands to be executed just break my head. :???:
I sit there now for 2 weeks on it and raff it simply not.
Therefore (and the Reallife what needs one) also my sudden radio silence ... to "Yincognito" squint ...at my last problem, what but first still rests...

Well, in (as) short as possible, what it's about:
I'm currently writing a slideshow, which contains a menu with a few standard options (open image etc.).
In this menu there is a button, which should open another (Advanced Menu), and then hide the first menu.
The crux is that now nesting occurs, what should happen when the mouse is over the one, or the other menu. Since the whole thing is then also distributed over the "slideshow.ini" and a "slideshowdata.inc", probably also "Nested variables" come into play.
But now it gets even more crazy, I got it working, it runs as it should, but when I leave the "Advanced Menu" with the mouse, I get errors or hints in the log, which are then e.g. like in the screenshot.

And the 2nd problem in the problem is, since also still another InputText-Plugin is involved, nails me also still purely, in the moment where it is activated, by it me the menu background closes, since I leave this yes (apparently according to syntax) with the mouse, by even the activation of the InputText-Plugin. That is, I seem to be with the mouse then no longer on the background, which contains the variable "variables", which were set by [!SetOption] before.

I do not know therefore just, whether I have made myself so stupid before loud various options test, that I do not see the forest before loud trees any more, or I think simply too complicated, or still worse the Rainmeter syntax have not understood.

Therefore, is there for my problem perhaps a (simple) solution, or do I try here straight from Rainmeter commands to require, which it cannot?

Here the files:

I've checked the skin and it seems to me you need so called magic quotes for your variables in question.
before: OpenMainMenu=[!SetOption CONTAINER_SlSh MouseLeaveAction "#LeaveMainMenu#"]
after: OpenMainMenu=[!SetOption CONTAINER_SlSh MouseLeaveAction """#LeaveMainMenu#"""]
I don't know how your skin operates so I can't really check if that is all you need. It would be easier to track down the problem and come up with a solution if you could strip down the skin to several elements where the problem occurs to demonstrate the problem itself.
User avatar
Youkai1977
Posts: 139
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Set nested [!SetOption] problem

Post by Youkai1977 »

Active Colors wrote: February 22nd, 2021, 1:57 pm It would be easier to track down the problem and come up with a solution if you could strip down the skin to several elements where the problem occurs to demonstrate the problem itself.
I've checked the skin and it seems to me you need so called magic quotes for your variables in question.
before: OpenMainMenu=[!SetOption CONTAINER_SlSh MouseLeaveAction "#LeaveMainMenu#"]
after: OpenMainMenu=[!SetOption CONTAINER_SlSh MouseLeaveAction """#LeaveMainMenu#"""]
I don't know how your skin operates so I can't really check if that is all you need.
The SlideShow is still under construction (i.e. beta). From therefore very probably for you in many places puzzling, what I want with what, or should be executed.
Therefore I just followed the tip, which I got here, upload everything (as *.rmskin) so that the overview is there.
To the other point, I have already experimented with it, and it did not work at all, or threw out even more errors.

EDIT: Sorry, skimmed your answer too quickly. But your tip seems to have been the solution. At least now the error from the log is gone when I leave the background with the mouse when I am in the Advanced Menu. Thanks :thumbup:

The Involved Meters/Measures:
In the file "slideshow.ini

Code: Select all

Measure
- [mSlider]
- [mReStartASMenu]

Meter(s)
- CONTAINER_SlSh]
- [MenuBGSlider]

MeterGroup(s)
- OSD
- SLIDER | MAIN
- AS01 - 06 | ASM
The involved variables
In the file "slideshowdata.inc

Code: Select all

ImgWidth=436
ImgHeight=246
OpenMainMenu=[!SetOption CONTAINER_SlSh MouseLeaveAction """#LeaveMainMenu#"""][!UpdateMeter CONTAINER_SlSh][!Redraw][!SetOption MenuHeader Text "SLIDESHOW - MAIN MENU"][!UpdateMeter MenuHeader][!Redraw][!CommandMeasure mSlider "Stop 2"][!CommandMeasure mSlider "Execute 1"]
LeaveMainMenu=[!HideMeter MP04][!Redraw][!Delay 150][!HideMeter MP03][!Redraw][!Delay 150][!HideMeter MP02][!Redraw][!Delay 150][!HideMeter MP01][!Redraw][!CommandMeasure mSlider "Stop 1"][!CommandMeasure mSlider "Execute 2"]
LeaveAdSeMenu=[!SetOption CONTAINER_SlSh MouseLeaveAction "#OpenMainMenu#"][!UpdateMeter CONTAINER_SlSh][!Redraw][!HideMeterGroup AS06][!Redraw][!Delay 150][!HideMeterGroup AS05][!Redraw][!Delay 150][!HideMeterGroup AS04][!Redraw][!Delay 150][!HideMeterGroup AS03][!Redraw][!Delay 150][!HideMeterGroup AS02][!Redraw][!Delay 150][!HideMeterGroup AS01][!Redraw][!Delay 150][!HideMeter AS_DividingLines][!Redraw][!Delay 150][!CommandMeasure mSlider "Stop 1"][!CommandMeasure mSlider "Execute 2"]
ReStartCommand=[!WriteKeyValue Variables ReStart "0" "#CURRENTPATH#slideshowdata.inc"][!SetOption MenuHeader Text "SLIDESHOW - ADVANCED SETTINGS"][!UpdateMeter MenuHeader][!CommandMeasure mSlider "Stop 2"][!CommandMeasure mSlider "Execute 1"][!ShowMeterGroup ASM]
ReStart=0
OffSet=#ImgWidth#
ShapeYCor=-20
Height=18
I hope I have not forgotten anything :oops:
Last edited by Youkai1977 on February 22nd, 2021, 2:47 pm, edited 3 times in total.
User avatar
ShadowDragon
Posts: 44
Joined: January 28th, 2021, 4:30 pm

Re: Set nested [!SetOption] problem

Post by ShadowDragon »

If you check the image, I see !SetOption: Skin "[!HideMeter"
shouldnot that be !SetOption: Skin "[!HideMeter]" (missing " ] in the error log")

this is only a guess though.
User avatar
Active Colors
Moderator
Posts: 916
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Set nested [!SetOption] problem

Post by Active Colors »

Youkai1977 wrote: February 22nd, 2021, 2:07 pm The SlideShow is still under construction (i.e. beta). From therefore very probably for you in many places puzzling, what I want with what, or should be executed.
Therefore I just followed the tip, which I got here, upload everything (as *.rmskin) so that the overview is there.
To the other point, I have already experimented with it, and it did not work at all, or threw out even more errors

EDIT: Sorry, skimmed your answer too quickly. But your tip seems to have been the solution. At least now the error from the log is gone when I leave the background with the mouse when I am in the Advanced Menu. :thumbup:
Yeah, was about to reply before your edit. It sounded strange that the magic quotes would case even more errors. You need it because in the sequence of bangs you have some bangs which have quotes, without the magic quotes around the variable the sequence is getting broken because Rainmeter is getting confused with all the quotes. And when I applied the magic quotes the error stopped to appear. I will be able to check what is going on with the second problem later, but, is your first problem resolved now?
User avatar
Youkai1977
Posts: 139
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Set nested [!SetOption] problem

Post by Youkai1977 »

ShadowDragon wrote: February 22nd, 2021, 2:20 pm If you check the image, I see !SetOption: Skin "[!HideMeter"
shouldnot that be !SetOption: Skin "[!HideMeter]" (missing " ] in the error log")

this is only a guess though.
I thought so too at first, but it wasn't.
I mentioned yes, I think that I nest myself there slowly in too many nestings. :uhuh: :???: O.O

@ActiveColors:
Yeah, was about to reply before your edit. It sounded strange that the magic quotes would case even more errors. You need it because in the sequence of bangs you have some bangs which have quotes, without the magic quotes around the variable the sequence is getting broken because Rainmeter is getting confused with all the quotes. And when I applied the magic quotes the error stopped to appear. I will be able to check what is going on with the second problem later, but, is your first problem resolved now?
Yes the error from the log when I leave the background of the advanced menu with the mouse is gone thanks to your tip.
PS.: I have edited my first answer a 2nd time.

Now I still have problem with the "SET" buttons, which trigger a [!Refresh] of the SlideShow. After that the extended menu should appear again which also works, thanks to a check of the "ReStart" variable, which checks a measure [mReStartASMenu] and then executes appropriate commands.
However, if I then (accidentally) click with the mouse on the background in the reopened extended menu, the first (main menu) also opens.
This not only looks like crap, it's not supposed to be like that. Not to mention that the so visually crippled menu then no longer closes when I leave the background or SlideShow with the mouse.
But well, as already mentioned, I'm nesting myself in nestings right now. :Whistle

Yes, and the problem with the InputText plugin, which also closes the background when activated, I still have to get a handle on it.
User avatar
Youkai1977
Posts: 139
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Set nested [!SetOption] problem

Post by Youkai1977 »

Continued at this point from this topic -> ImageSize 4.0
Referenced by 'balala' squint ... :D :welcome:

Here as in the other thread the current (construction site) version of my SlideShow ... or should I slowly call it the "Never Ending" SlideShow?! For weeks I'm sitting on it now... :( :yawn:
Slowly I can't see this thing anymore ... I am already code blind ... :uhuh:

Ok, to the current version:

CHANGES/EXTENSIONS:
- MENU is no longer divided into MAIN and ADVANCE SETTINGS
- MENU is now called via a button that slides into the image (upper right center button) by mouse click
- MENU SLIDING now runs completely via an ActionTimer plugin/measure
- Color change (black <-> yellow) of the upper and lower bars via Variable ALPHA in the slide
- FADE function on image change (original from ImageFade.ini here from the forum)
- The "slideshow.ini" like the "slideshowdata.inc" have been cleaned from code garbage/remnants as far as possible
- The "slideshowuserdata.ini" is completely omitted, because most of the functions can now be set directly via the menu and are then automatically written to the "slideshowdata.ini".
... yep, I think that's it for now...

CURRENT PROBLEMS/Planned CHANGES/FUNCTIONS
- I get various error messages about the slider (ActionTimer measure of the menu) depending on the state of the menu (e.g. 'ActionList4' is currently running or 'ActionList2' is currently running)
- In this context the upper and lower black bar in the SlideShow in the alpha is set to "0" again if you move the mouse over the SlideShow several times in a row. This means that ActionList 2 is executed, although it should NOT be.
- ImageName (FILE NAME -> displayed at the bottom of the SlideShow) is updated incorrectly. It shows the name of another image, not the current one. Runs partly via a *.lua file
- The modified fade function ("ImageFade.ini" here from the forum) of the image works, but the CPU load is sometimes extremely high (up to 50%)
- MENU should be extended by one item (selection of the image path via FileView.dll)
- The colors in the slideshow are still in the adjustment (to my whole planned SUITE)
- CODE optimizations concerning commandos, sequences etc.
- The whole TIME-SET part (Measures) works as I wanted (and seems to be error free), but I think there would be something else/better how to implement this
- While I'm typing this text here, I also notice that the SlideShow pushes the image up a few pixels too far, depending on the V-Shift (ImageSize.dll). Estimated 5px...

Ok, yes so it looks like I said currently. Purely basically it works, but it is definitely not FINAL
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 13497
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Set nested [!SetOption] problem

Post by balala »

I'm sorry I have to admit I didn't read the whole topic, being quite long. However related to the Slideshow.ini skin, here are a few observations I have to do.
First note that as I previously said, I don't see the benefit of setting the Image meter ([SlideShow]) to a such complicated position (especially its Y position). I'd simply use either X=0 and Y=0 (it's not a mistake didn't want to set it to X=0r and Y=0r), or to X=3 and Y=3. Adding the r parameter is not needed, because: https://docs.rainmeter.net/manual/meters/general-options/container/#Usage (see Relativity section).
Another change I'd do is to replace the PreserveAspectRatio=2 with PreserveAspectRatio=1 ([SlideShow] meter), to have visible the whole image.
User avatar
Youkai1977
Posts: 139
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Set nested [!SetOption] problem

Post by Youkai1977 »

balala wrote: March 1st, 2021, 6:12 pm I'm sorry I have to admit I didn't read the whole topic, being quite long. However related to the Slideshow.ini skin, here are a few observations I have to do.
First note that as I previously said, I don't see the benefit of setting the Image meter ([SlideShow]) to a such complicated position (especially its Y position). I'd simply use either X=0 and Y=0 (it's not a mistake didn't want to set it to X=0r and Y=0r), or to X=3 and Y=3. Adding the r parameter is not needed, because: https://docs.rainmeter.net/manual/meters/general-options/container/#Usage (see Relativity section).
Another change I'd do is to replace the PreserveAspectRatio=2 with PreserveAspectRatio=1 ([SlideShow] meter), to have visible the whole image.
You don't have to apologize, it's all good. And since I want help, I'll just have to be patient. Especially since my slideshow as you mentioned really meanwhile a long topic, a lot of code (and in it probably a lot of garbage and complications) are in it.

I have now yesterday also made a few changes to my slideshow. Among other things because I have added a graphic thing above the slideshow, which I need later for the complete suite as a component.
But this moves the slideshow [meter] in the Y-axis to Y=44.
And already I noticed what you wrote. Leave the SlideShow at X=0, Y=0, that still works.
Above all, I also noticed what influence the CONTAINER-[Meter] has on the coordinates X,Y on ALL meters within the skin, which was also a completely new insight for me.
If the CONTAINER is set to X,Y=0, for example, this has an influence on all [METER] that are linked to the container. If a meter in the container has for example Y=80 and the CONTAINER itself lies on Y=44, then the meter lying in the CONTAINER is NOT displayed on Y=80 of the entire skin, but on Y=80 within the CONTAINER. So in my case also the SLIDESHOW-[Meter] which I have correspondingly now on X,Y=0 and then only the CONTAINER on Y=44 in which the Slideshow-[METER] lies.
So now also the ImageSize.dll story works without problems in context
with PreserveAspectRatio=2 and no fixed H= specification.

I hope you haven't started editing the slideshow.rmskin you uploaded the day before yesterday, because I'll upload the current version for you.
It's still not finished and still has one or the other bug mentioned above, but at least the ImageSize.dll story is done.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 13497
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Set nested [!SetOption] problem

Post by balala »

I don't know how are you creating the .rmskin skin installers, because the structure of the uploaded SlideShow_02_03_2021.rmskin is, well... let's say at least weird. The Fonts folder for instance has to be in the @Resources folder, but in your package it is outside of it. The Plugins folder has to be outside of the Skins folder, in your case it is inside, and even more: it's inside of SlidShow config as well. It also should have to include both plugin versions, the x64 and the x86 as well, but it has only the 64bit version and even that with a wrong folder name.
If you'd cretae the installer then you'd modify it manually, Rainmeter would refuse to run it. But your installer can be ran. So my first question here is how have you created this SlideShow_02_03_2021.rmskin skin installer? I have no idea... :confused: