It is currently April 13th, 2021, 10:18 am

Set nested [!SetOption] problem

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

Re: Set nested [!SetOption] problem

Post by Youkai1977 »

Active Colors wrote: March 4th, 2021, 7:22 pm Hey, I wanted to get to your problems earlier but got busy with personal things so I am writing after all this time. I see you have already resolved your problems and what you are looking for is the code optimization help. From what I see is you have optimized it very well so far. I can only recommend you to consider changing your way of coding. It is something personal and that would probably require rewriting the whole skin. But since you have several times mentioned that you are a codeblind with your own code then I suppose it is within your interest to consider this.

I already have forgotten when I have been codeblind the last time because I have worked on the ways to reduce the amount of code in my skins :)
No problem that you didn't get around to it. I don't expect everyone here in the forum to leave their things immediately and take care of Prince Youkai's worries. So all is well ... ;-)

Right, I got a lot of things under control in the meantime. Partly because I have discarded things, partly because I have found the error itself.
But all in all it is not finished yet. Some things still need to be implemented and some things are running, but not the way I want them to.

Jo, your skin looks very tidy. And I definitely want to do that with my skins, as well as ultimately with the SlideShow.
With the next skin, where I (as a vacation break from my SlideShow) just work on it, there I'm already a little different on the way in the code regarding overview and order. All in all, you will recognize my coding style in the end, but (hopefully) tidier.
Whether I succeed depending on the complexity of the respective skin remains to be seen ... but I try. Alone already for one. Because in the end Rainmeter is only a hobby for me, for which I have just (among other things because of Corona) a little more time for. But this is not the norm. And if I have a skin/suite once finished, it will be very likely that I make a year or longer then again nothing more. And then it's an advantage to have a proper code, if you then later go to his skins again ran.
balala wrote: March 4th, 2021, 8:11 pm I really like it. The movement of those buttons is extremely well looking, I like it very much. Congratulations!

Now it really doesn't, but in the previous package it was there. You can easily check, the uploaded package is still there.

To be honest it's extremely hard for an "outsider" to follow what's going on in your skin. Not sure I can deal with those variables, at least not too quickly. Have to study a little bit the code, but definitely not now, due to the time-lack. Sorry, but will do this probably in the upcoming weekend. Sorry...

Regarding its structure, yep, it's correct this time, as said previously.
Yes curious that the one rmskin package was wrong again.
But anyway, if the last one worked now everything is good. This is as I said also the latest version of my slideshow ... so also the version, which you can look at then gladly, in Punkto my described worries, problems etc..

But as I have already written "AC", do not stress. "Good things come to those who wait" as the saying goes. And I have now on the WE (family / reallife conditioned) for Rainmeter now so or not much time.
In this sense ... do as you have time and desire. Of course, you are welcome to use one or the other idea from my SlideShow for your own purposes. I have and do not do otherwise ... :oops:

My current suite I'm working on (where the slideshow is part of) ... is based in one or the other place on code snippets of others here from the forum, or from skins at DeviantArt.
And if everything works out, my finished suite will have a strong resemblance to this -> Screentron UI
The look of the head of my SlideShow already indicates this.
Everything from the style from the link I will not take over. First because I'm limited to 2 screens, of which only one will run Rainmeter. And that one also has only 1440x900 resolution. So not too much space for elements and optical effects.
Secondly, I'm changing a few things in the visuals. One is that I don't use the font "Orbitron" but "Square721 BT", because the former is not monospace, which is crap for skins where numbers are used. And Square721 BT is nearly similar enough for me. But I haven't found something better yet.
Also I change the number of colors that will be used. Should also be noticed in my SlideShow, that there is yellow among other things, which is not the case with the screens from the link.
But anyway, that I do not convert the style from the link 1:1 has also the reason that I want to be on the safe side, if there are any copyright rights ... with such a thing I do not really deal.

But back to my SlideShow ... as already said, do when and how you have time. No stress ... ;-)
User avatar
balala
Rainmeter Sage
Posts: 12545
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Set nested [!SetOption] problem

Post by balala »

Youkai1977 wrote: March 4th, 2021, 10:39 pm In this sense ... do as you have time and desire.
As said, I hope on the weekend will have a little bit more time to take a deeper look. However I still have a few suggestions. They are not new, I already made them previously:
  • I still believe there is no need to vertically position the [SlideShow] meter to Y=[mYPosition]. Since the meter has a container, still believe that a static position would be better.
  • Me personally still would prefer the PreserveAspectRatio=1 option on the same [SlideShow] meter (instead of the used PreserveAspectRatio=2). With PreserveAspectRatio=1 you get visible the whole image, its upper and lower (left and right, depending on the aspect ration of the current image) parts are not cut of.
On the other hand, as already said before, the skin is very good written and I like its style. Not talking about how those buttons are moving when hovering the mouse over the skin / leaving it. Congratulations once again.
User avatar
Youkai1977
Posts: 138
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Set nested [!SetOption] problem

Post by Youkai1977 »

balala wrote: March 5th, 2021, 9:44 am As said, I hope on the weekend will have a little bit more time to take a deeper look. However I still have a few suggestions. They are not new, I already made them previously:
  • I still believe there is no need to vertically position the [SlideShow] meter to Y=[mYPosition]. Since the meter has a container, still believe that a static position would be better.
  • Me personally still would prefer the PreserveAspectRatio=1 option on the same [SlideShow] meter (instead of the used PreserveAspectRatio=2). With PreserveAspectRatio=1 you get visible the whole image, its upper and lower (left and right, depending on the aspect ration of the current image) parts are not cut of.
On the other hand, as already said before, the skin is very good written and I like its style. Not talking about how those buttons are moving when hovering the mouse over the skin / leaving it. Congratulations once again.
Thank you again for the praise on my menu. Then the effort was worth it if it is so well received. :great: :rosegift:

For the slideshow, I have now changed the following for the test (based on your tips) ...

MEASURE-PART:

Code: Select all

[mWidth]
Measure=PLUGIN
Plugin=ImageSize
ImageName=[mSlideShow]
Dimension=Width
DynamicVariables=1
UpdateDivider=-1
Disabled=1
Group=mSiPo

[mHeight]
Measure=PLUGIN
Plugin=ImageSize
ImageName=[mSlideShow]
Dimension=Height
DynamicVariables=1
UpdateDivider=-1
Disabled=1
Group=mSiPo

[mTrimHeight]
Measure=CALC
Formula=(Trunc(#ImgWidth#/1.3333))
UpdateDivider=-1
Disabled=1
Group=mSiPo
SLIDESHOW-METER:

Code: Select all

[SlideShow]
Meter=IMAGE
MeasureName=mSlideShow
PreserveAspectRatio=1
ImageAlpha=#SlShAlpha#
AntiAlias=1
X=0
Y=0
W=#ImgWidth#
H=[mTrimHeight]
DynamicVariables=1
UpdateDivider=-1
Container=CONTAINER_SlSh
Group=SUBF | GREY | TINT
VARIABLE-PART: (slideshowdata.inc)

Code: Select all

ImgInf=IMG TRIM INFO: #ImgWidth#[\x00D7]#ImgHeight# [\x2217] [mWidth][\x00D7][mHeight] [\x2217] [\x22BB] [mTrimHeight]
However, the solution doesn't seem to work well. Some images are now shifted too far down in the Y-axis.
Ps: My photos have different resolutions and formats. Partly 4: 3 and then some 16:10

But as I said, don't be in a hurry for now. No stress with my slideshow. I probably don't have time for Rainmeter on the weekend anyway.
User avatar
balala
Rainmeter Sage
Posts: 12545
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Set nested [!SetOption] problem

Post by balala »

Youkai1977 wrote: March 5th, 2021, 11:32 am However, the solution doesn't seem to work well. Some images are now shifted too far down in the Y-axis.
Ps: My photos have different resolutions and formats. Partly 4: 3 and then some 16:10
The [mTrimHeight] is unneeded, at least as far as I can say. If you add only the W option to the [SlideShow] and remove the H (and note that in this case you can remove the PreserveAspectRatio option as well, if this one is set to 1, because if you're using only one of the W and H options, the PreserveAspectRatio is set automatically to 1 - see the Note here). No need to set the height as well.
User avatar
Youkai1977
Posts: 138
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Set nested [!SetOption] problem

Post by Youkai1977 »

Somehow I am totally confused now. O.O :???:
But let's start from the beginning...
So far I have always designed my SlideShows in the width and height that it fit in the trim to the original size of the image.
That is, I have an image editing program where I can calculate if a picture/photo which has, say 3264x2448 pixels, and my SlideShow (like the one we are talking about here) should be 442 pixels wide, how the height of the slideshow must be so that the format is correct and no image distortions occur. So far I have always done well with this.
Then I found the ImageSize plugin here in the forum and related to this link -> https://forum.rainmeter.net/viewtopic.php?t=32740&start=10
And I have implemented this in my current Sildeshow.
Only, and already we are where we are ... now it's about PreserveAspectRatio= 1 or 2 or not at all, omitting the image height, or H= image width by 1.3333 and what I haven't found everything on this topic.
My goodness, one becomes confused in the head ... :?

In short, your last tip, NO "H" specification and omit PreserveAspectRatio, which then corresponds to PreserveAspectRatio=1, so I drive in the result just as well (until now) as if I use my classic method as described above.
Only that I had with my classical method the problem, if a photo in the 4:3 format comes, that I had then left and right bars. What I just did not want, which is why I was looking for a solution and then found the above link, which but now again leads to the fact that we write here on this topic just ... I fall over ... in German I would now say "You just have to pull the nipple through the tab and turn the small crank all the way up. An arrow appears immediately. And then you press on it. And the tube opens."
A classic German comedian song, which, however, just reminds me at Coden in Rainmeter how much seriousness there is in this old song.

Well, anyway, I'll let your last tip run for now, and if it works, that's good. Then I tear out later all unnecessary Measures, Variables etc to this topic again.
However, I give then no guarantee that my SlideShow will run in the image proportions with others then times perfectly.
User avatar
balala
Rainmeter Sage
Posts: 12545
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Set nested [!SetOption] problem

Post by balala »

Youkai1977 wrote: March 5th, 2021, 8:48 pm Somehow I am totally confused now. O.O :???:
I'm not surprised. Made a confusion, hurrying a little bit more than was necessary.
So to fix my mistake, here is what I meant:
Add / use both, the W and the H option on the [SlideShow] meter, along with a PreserveAspectRatio=1 (or eventually 2, as you like it more), but use static values for all four (X, Y, W and H) options.
Sorry again for my mistake. I'm not surprised you were confused. Easy to explain why.
User avatar
Youkai1977
Posts: 138
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Set nested [!SetOption] problem

Post by Youkai1977 »

balala wrote: March 6th, 2021, 4:12 pm I'm not surprised. Made a confusion, hurrying a little bit more than was necessary.
So to fix my mistake, here is what I meant:
Add / use both, the W and the H option on the [SlideShow] meter, along with a PreserveAspectRatio=1 (or eventually 2, as you like it more), but use static values for all four (X, Y, W and H) options.
Sorry again for my mistake. I'm not surprised you were confused. Easy to explain why.
First of all sorry for the late response ... just some around the ears.

Then to your excuse ... everything is fine, it's not like I don't make (careless) mistakes. :oops:
I have now given fixed values on X,Y as well as W,H at PreserveAspectRatio=2
So it is an acceptable variant for images of different formats and resolutions, if I don't want to have bars (top/bottom or left/right).
With the 4:3 pictures there is something cut off at the top and at the bottom, so that some pictures are rather out of question for the SlideShow (son without head is somehow ... strange ...). :( O.O

Well, so then some measures are superfluous.
Anyway, if you want to have a look at my SlideShow, you can let me know before. Then I will upload the latest version. There are some (smaller) changes in it. Among other things, the image format problem discussed here, as well as the image counter part (the measures) I have made a major change.
User avatar
balala
Rainmeter Sage
Posts: 12545
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Set nested [!SetOption] problem

Post by balala »

Youkai1977 wrote: March 9th, 2021, 11:15 pm I have now given fixed values on X,Y as well as W,H at PreserveAspectRatio=2
So it is an acceptable variant for images of different formats and resolutions, if I don't want to have bars (top/bottom or left/right).
With the 4:3 pictures there is something cut off at the top and at the bottom, so that some pictures are rather out of question for the SlideShow (son without head is somehow ... strange ...). :( O.O
This is going on due to the PreserveAspectRatio=2 option. If you set it to 1, the whole image will be always visible. That's why I suggested you this solution. Me personally definitely like it much more then the PreserveAspectRatio=2.
Youkai1977 wrote: March 9th, 2021, 11:15 pm Anyway, if you want to have a look at my SlideShow, you can let me know before. Then I will upload the latest version. There are some (smaller) changes in it. Among other things, the image format problem discussed here, as well as the image counter part (the measures) I have made a major change.
Alright, if you post it, I'll take a look.
User avatar
Youkai1977
Posts: 138
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Set nested [!SetOption] problem

Post by Youkai1977 »

balala wrote: March 10th, 2021, 6:50 am This is going on due to the PreserveAspectRatio=2 option. If you set it to 1, the whole image will be always visible. That's why I suggested you this solution. Me personally definitely like it much more then the PreserveAspectRatio=2.

Alright, if you post it, I'll take a look.
First of all sorry again for the late feedback ... currently boxing with me the pope ... :yawn:

Yes, but if I take PreserveAspectRatio=2 I have no bars depending on the aspect ratio (4:3 or 16:9). And this is what I want to have. The frame or container (where the SlideShow runs in) is of the size at W=442 and H=252 pixels, and thus of the format approximately/about at an aspect ratio of 16:9. Moreover, I have coded this size statically. So no adjustment of the whole SlideShow to the screen resolution of the PC or similar gimmicks. This is too complicated for me at the moment and I haven't read up enough on it yet.
Therefore, that fits already for the time being so with the PreserveAspectRatio=2. I sort out on occasion then only the pictures, where my son would have as said with the setting otherwise a cut off head and is good.
I also want to get further slowly. After all, I'm sitting since January 2021 on this stupid SlideShow and still have a complete suite to make. Where I'm parallel also still at it and also constantly encounter problems. But there you will still read in other threads from me.
Therefore, I go in terms of image format and position for now this compromise. And when I have time and desire again, I think of maybe something else.

Ok, finally as promised the latest BETA of my SlideShow attached.
You can take it for dissecting and have a look at the details, where I messed up something, or what could be done better/differently. In addition at this point again to my problems / wishes etc. further back in this topic may refer...

And take your time, do as you like and have time. I have the next days for Rainmeter (and certainly not for my slideshow) really intensive time.
But if there should be something, or questions, then write here. I will answer as soon as possible.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 12545
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Set nested [!SetOption] problem

Post by balala »

Youkai1977 wrote: March 12th, 2021, 3:41 pm Yes, but if I take PreserveAspectRatio=2 I have no bars depending on the aspect ratio (4:3 or 16:9). And this is what I want to have.
Alright. I deeply dislike this, but obviously we have different preferences.
Youkai1977 wrote: March 12th, 2021, 3:41 pm I sort out on occasion then only the pictures, where my son would have as said with the setting otherwise a cut off head and is good.
This is why I dislike the result of the PreserveAspectRatio=2 option.
Youkai1977 wrote: March 12th, 2021, 3:41 pm You can take it for dissecting and have a look at the details, where I messed up something, or what could be done better/differently.
What I think is missing (unless I am missing something) is an OK button on the settings panel. I mean that if I open the settings panel (with the settings button, which appears on right when I'm hovering the mouse over the skin) and I make any setting, how do I accept it? Where should I click to return to the slideshow? From time to time when the time of the current image expires, the settings are closed, but not always. Couldn't discover what has to go on it to happen, but however in some cases I see the time counting down on the settings, but then nothing: the settings panel is kept and in such a case a refresh is the only thing I can do in order to get back the slideshow. I have a feeling that you should improve a little bit the code in this direction. Am I missing something in this direction?