It is currently March 29th, 2024, 1:17 am

Move Item in Y-Axis when Variable=0 (Launcher)

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Move Item in Y-Axis when Variable=0 (Launcher)

Post by Yincognito »

balala wrote: February 3rd, 2021, 7:13 am Alright, but OP should help us to can help him. It would much more easier (for me ta least definitely) to have the whole config, with its original structure, not to have to recreate it manually: url=https://forum.rainmeter.net/viewtopic.php?f=5&t=28421#p148358.
Yes, you're right, it would be easier indeed. By the way, he posted the skin in his last reply.
Great point with "help us help him" - that's spot on. :thumbup: Personally, for basic things I don't necessarily need the packed skin (you probably noticed that I don't often request the complete package from OPs), but for more complex stuff that is a MUST. At least if the OPs want us to work on their own code, since not everyone understands quickly how to adapt basic example of "how to" do this or that.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Move Item in Y-Axis when Variable=0 (Launcher)

Post by Youkai1977 »

P.S. Your skin looks and behaves well - nice work.
Thank you thank you, yes, the last 4 weeks cost me a lot of anger, frustration and sweat (due to my lack of knowledge of the Rainmeter syntax). And again and again new ideas come up which then want to be implemented and put into practice. In short, a finished skin is somehow never finished * lol *
Excellent! :great: Yes, the parts where I simulated items being empty or not by clicking those little squares on the left side of my sample, were only meant for demonstration and testing purposes, and you did right by not including them in your actual skin. If you don't understand something, ask, don't be shy. :sly: You can also read the "Notes" of my first version of the sample (the one where the little squares are at the top) and see if you can wrap your head around the concepts - you were already going in the right direction, all I did was simplify some things by using some formulas and conditional operations.
Yes, I am sure that one or the other question / call for help will come from me again in the near future. As I said, I have serious problems with the Rainmeter syntax. I can already see that in the example from the link you posted.
Now that you have helped me with my problem and posted the link, now I also buckle up what and what these codes are for.
In short, I have to see examples to understand the matter. In other words, if I have an idea / problem, I don't know what to look for in order to find a solution, or whether there is a solution at all. :confused:

However, Rainmeter is a hobby and there is no rush.
Now I try to implement my actual goal first and to rebuild my entire skin suite based on (mostly) SHAPE, such as code-optimized (CPU-friendly). When that's done, I'll at least (hopefully) understand the SHAPE syntax.

In this sense ... I will take a closer look at your examples from your help, but not today. Now, first of all, real life, far from Rainmeter, calls for me.
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Move Item in Y-Axis when Variable=0 (Launcher)

Post by Youkai1977 »

Yincognito wrote: February 3rd, 2021, 12:38 pm Yes, you're right, it would be easier indeed. By the way, he posted the skin in his last reply.
Great point with "help us help him" - that's spot on. :thumbup: Personally, for basic things I don't necessarily need the packed skin (you probably noticed that I don't often request the complete package from OPs), but for more complex stuff that is a MUST. At least if the OPs want us to work on their own code, since not everyone understands quickly how to adapt basic example of "how to" do this or that.
Yes, as I said, I didn't really have it on my screen that I was causing such a confusion with my confused code posting.
At the moment I was so muddy in my head trying to find a solution myself that I no longer paid attention to it.
But as I said, despite everything, "hats off" that they were first of all willing to help me Honk and, above all, to look through my chaos.
Your / the forum is simply priceless :thumbup: :great: :rosegift: :thumbup: :great: :rosegift:

In any case, I vow to improve in the future when posting more complex problems :oops:
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Move Item in Y-Axis when Variable=0 (Launcher)

Post by Yincognito »

Youkai1977 wrote: February 3rd, 2021, 12:59 pmIn short, I have to see examples to understand the matter. In other words, if I have an idea / problem, I don't know what to look for in order to find a solution, or whether there is a solution at all. :confused:
Seeing examples to understand is natural. Regarding your questions, you should be aware that:
- there is almost always a solution (or more than one) to any problem, in any situation, not just Rainmeter related stuff
- your best bet is to look in the Rainmeter manual for the sections that are related to your idea / problem (e.g. if you want a visualizer, look at AudioLevel plugin, if you want some animation, look at the ActionTimer, and so on); if that doesn't work and you still have issues, get help from the forum
Youkai1977 wrote: February 3rd, 2021, 1:06 pmYes, as I said, I didn't really have it on my screen that I was causing such a confusion with my confused code posting.
At the moment I was so muddy in my head trying to find a solution myself that I no longer paid attention to it.
But as I said, despite everything, "hats off" that they were first of all willing to help me Honk and, above all, to look through my chaos.
Your / the forum is simply priceless :thumbup: :great: :rosegift: :thumbup: :great: :rosegift:

In any case, I vow to improve in the future when posting more complex problems :oops:
Yeah, no problem, we're always glad to help here. Luckily you understood very well how to adapt and use stuff from such basic examples in your own scenario / skin. It's a bit more effort for you to extract and possibly modify things according to your preference, but it helps nevertheless.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Move Item in Y-Axis when Variable=0 (Launcher)

Post by Youkai1977 »

Yincognito wrote: February 3rd, 2021, 1:17 pm Seeing examples to understand is natural. Regarding your questions, you should be aware that:
- there is almost always a solution (or more than one) to any problem, in any situation, not just Rainmeter related stuff
- your best bet is to look in the Rainmeter manual for the sections that are related to your idea / problem (e.g. if you want a visualizer, look at AudioLevel plugin, if you want some animation, look at the ActionTimer, and so on); if that doesn't work and you still have issues, get help from the forum
By and large, I'll go over the Rainmeter manual as well. And a lot of things can usually be quickly understood by me. Despite the language barrier and partly ignorance of the Rainmeter syntax.
However, as I said, when it comes to more complicated things, get on the proverbial hose quickly.
There are then again more examples like here from the forum that I come across and can take parts of them in order to implement them or to understand or to see "Ah, there is something like that too"
My bookmarks in the browser for Rainmeter (examples) are now so rich that I have partly forgotten that I had already seen problem XY there and saved it as a link.
Yeah, no problem, we're always glad to help here. Luckily you understood very well how to adapt and use stuff from such basic examples in your own scenario / skin. It's a bit more effort for you to extract and possibly modify things according to your preference, but it helps nevertheless.
That's right, once I've understood the logic of the syntax, it will usually be easy for me later.
Then sometimes it is only "overlooked" errors that cause me problems. A forgotten bracket, a wrongly placed comma, or the measure and meter have the same name, and such stupid careless mistakes.

Here is an example once i have understood how it works, what is possible when it comes to optimization, for example.

Example 1 (Code Snippet from my Alarm Clock ... as it was before):

Code: Select all

;--- Alarm-SET ------------------------------------

[AlarmBG]
Meter=Image
solidcolor=0,0,0,1
X=0
Y=0
W=#Width#
H=#Height#
Hidden=1
Group=ALARMSET
MouseLeaveAction=[!HideMeterGroup ALARMSET][!ShowMeterGroup CLOCK][!ShowMeter AlarmIconON][!ShowMeterGroup ALARMON][!HideMeter AlarmSetIcon][!Redraw]

[HourAlarm]
Meter=String
MeterStyle=Style1 | Style2
FontSize=#FS1#
Text="#ValueHourSet#"
X=6
Y=-9
DynamicVariables=1
Hidden=1
Group=ALARMSET
MouseScrollUpAction=[!SetVariable ValueHourSet (#ValueHourSet#+1)][!UpdateMeasureGroup mALARM][!UpdateMeter HourAlarm][!Redraw]
MouseScrollDownAction=[!SetVariable ValueHourSet (#ValueHourSet#-1)][!UpdateMeasureGroup mALARM][!UpdateMeter HourAlarm][!Redraw]

[MinuteAlarm]
Meter=String
MeterStyle=Style1 | Style2
FontSize=#FS1#
Text="#ValueMinuteSet#"
X=92r
Y=r
DynamicVariables=1
Hidden=1
Group=ALARMSET
MouseScrollUpAction=[!SetVariable ValueMinuteSet (#ValueMinuteSet#+1)][!UpdateMeasureGroup mALARM][!UpdateMeter MinuteAlarm][!Redraw]
MouseScrollDownAction=[!SetVariable ValueMinuteSet (#ValueMinuteSet#-1)][!UpdateMeasureGroup mALARM][!UpdateMeter MinuteAlarm][!Redraw]
Example 2 (Code Snippet from my Alarm Clock ... after optimizing ... same function):

Code: Select all

;--- MEASURE CLOCK & ALARM-SWITCH -----------------

[mClockAlarm]
Measure=Calc
Formula=#State#
IfEqualValue=0
IfEqualAction=[!EnableMeasureGroup mALARM][!UpdateMeasureGroup mALARM][!ShowMeterGroup ALARMSET][!ShowMeterGroup ALARMON][!HideMeterGroup CLOCK][!UpdateMeter *][!Redraw]
IfAboveValue=0
IfAboveAction=[!HideMeterGroup ALARMSET][!ShowMeterGroup CLOCK][!UpdateMeter *][!Redraw]
DynamicVariables=1

[...]
...
...
...
[...]

[HourAlarm]
Meter=STRING
SolidColor=0,0,0,1
Padding=29,-7,145,18
MeterStyle=Style1 | Style2 | Style3 | Style8
FontSize=#FS6#
Text="#ValueHourSet#"
X=0
Y=0
DynamicVariables=1
Hidden=1
Group=ALARMSET
MouseScrollUpAction=[!SetVariable ValueHourSet (#ValueHourSet#+1)][!UpdateMeasureGroup mALARMSET][!UpdateMeter HourAlarm][!Redraw]
MouseScrollDownAction=[!SetVariable ValueHourSet (#ValueHourSet#-1)][!UpdateMeasureGroup mALARMSET][!UpdateMeter HourAlarm][!Redraw]
MouseLeaveAction=[!SetVariable State "1"][!UpdateMeasure mClockAlarm]

[MinuteAlarm]
Meter=STRING
MeterStyle=Style1 | Style2 | Style3 | Style8
FontSize=#FS6#
Text="#ValueMinuteSet#"
X=113r
Y=-7r
DynamicVariables=1
Hidden=1
Group=ALARMSET
MouseScrollUpAction=[!SetVariable ValueMinuteSet (#ValueMinuteSet#+1)][!UpdateMeasureGroup mALARMSET][!UpdateMeter MinuteAlarm][!Redraw]
MouseScrollDownAction=[!SetVariable ValueMinuteSet (#ValueMinuteSet#-1)][!UpdateMeasureGroup mALARMSET][!UpdateMeter MinuteAlarm][!Redraw]
The meter [AlarmBG] could be omitted and its function is now taken over in example 2 by the meter [HourAlarm] by inserting the command "Padding" which represents the background on which the mouse lies.

In short, it's like you say when you understand it ... which can take time for me :oops: :???:

So now I'm really out for today. I have to do something ...
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Move Item in Y-Axis when Variable=0 (Launcher)

Post by Yincognito »

Youkai1977 wrote: February 3rd, 2021, 1:46 pmHere is an example once i have understood how it works, what is possible when it comes to optimization, for example.
Personally, I never used and never will use IfActions:

Code: Select all

[mClockAlarm]
Measure=Calc
Formula=#State#
IfEqualValue=0
IfEqualAction=[!EnableMeasureGroup mALARM][!UpdateMeasureGroup mALARM][!ShowMeterGroup ALARMSET][!ShowMeterGroup ALARMON][!HideMeterGroup CLOCK][!UpdateMeter *][!Redraw]
IfAboveValue=0
IfAboveAction=[!HideMeterGroup ALARMSET][!ShowMeterGroup CLOCK][!UpdateMeter *][!Redraw]
DynamicVariables=1
A much more versatile and comprehensive choice is to use IfConditions:

Code: Select all

[mClockAlarm]
Measure=Calc
Formula=#State#
IfCondition=(mClockAlarm=0)
IfTrueAction=[!EnableMeasureGroup mALARM][!UpdateMeasureGroup mALARM][!ShowMeterGroup ALARMSET][!ShowMeterGroup ALARMON][!HideMeterGroup CLOCK][!UpdateMeter *][!Redraw]
IfFalseAction=[!HideMeterGroup ALARMSET][!ShowMeterGroup CLOCK][!UpdateMeter *][!Redraw]
DynamicVariables=1
The latter can:
- use whatever numerical measure or variable in the test, not just the current measure
- use whatever logical tests, single or multiple, including combinations based on logical AND (i.e. &&) and OR (i.e. ||)
- use whatever formulas in both sides of the test

Basically, IfConditions are upgraded versions of the more basic IfActions. Just saying...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Move Item in Y-Axis when Variable=0 (Launcher)

Post by Youkai1977 »

Yincognito wrote: February 3rd, 2021, 3:47 pm Personally, I never used and never will use IfActions:

A much more versatile and comprehensive choice is to use IfConditions

The latter can:
- use whatever numerical measure or variable in the test, not just the current measure
- use whatever logical tests, single or multiple, including combinations based on logical AND (i.e. &&) and OR (i.e. ||)
- use whatever formulas in both sides of the test

Basically, IfConditions are upgraded versions of the more basic IfActions. Just saying...
Ok, I understand your reasons for preferring the "If Conditions".
I also implemented your suggestion in my watch as a test. However, I don't see any advantages / disadvantages for myself or for what the measure should do for me in my watch.
Because my measure posted in the code snippet should actually only switch off the part where the alarm was set and display the normal time again. And I thought to check the # State # for 0 or 1 (mouse on background or no more), my version would work too.

But ok, since my watch is again such a patient, which originally came from somewhere on the Internet, and has only been changed a little here and there in appearance and function by me over the years, I have (until now) honestly I didn't really think about the original code and the sense or nonsense it contained. :confused: :oops:

But I've already written that somewhere that I'm starting now ... to revise skins and their code with thought and questioning

Even if it doesn't belong in the thread, this is actually about my launcher, but I once put the clock in my post as an *.rmskin. This way you can get a better overview than just with the code snippets posted here
You do not have the required permissions to view the files attached to this post.
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Move Item in Y-Axis when Variable=0 (Launcher)

Post by Yincognito »

Youkai1977 wrote: February 3rd, 2021, 9:55 pmOk, I understand your reasons for preferring the "If Conditions".
I also implemented your suggestion in my watch as a test. However, I don't see any advantages / disadvantages for myself or for what the measure should do for me in my watch.
Exactly - there aren't any differences in functionality in this case, both variants do the same thing. My point was that in general, since IfConditions can do all that IfActions do and more, using IfConditions becomes the logical and the flexible choice. In other words, while here you didn't need the things that IfConditions can do and IfActions were enough, in a lot of other cases (or even if you edit the code someday and need some more features in the logical test) IfConditions are better suited and more comprehensive.

Basically, it's like using a smartphone instead of "just" a classic phone because it allows you to do more things than just talk to someone. Even though they are both essentially phones and one might not need the smartphone now, folks will eventually use it even if they only need to talk with someone on the phone most of the time ... just in case they need more at a certain point. I don't know if you understood where I'm going with this, but yeah, in your case using one over the other doesn't bring any obvious benefit. It's more like a personal (probably others' as well) "coding practice".
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth