It is currently March 29th, 2024, 11:29 am

Real basic parameter question

Get help with creating, editing & fixing problems with skins
User avatar
Codger
Posts: 97
Joined: May 29th, 2017, 3:16 pm

Re: Real basic parameter question

Post by Codger »

I'm posting this here rather than start a new topic because the picture above may add a little context.

In my shotgun method of debugging once logic has failed I have entered some weird territory.

Code: Select all

[DidItMove]
Measure=Calc
Formula=(#LastX#<>#CURRENTCONFIGX#)||(#LastY#<>#CURRENTCONFIGY#)
IfAboveValue=0
IfAboveAction=[!Move #CURRENTCONFIGX# [StackPos] "Codger\WiFi"][!Move #CURRENTCONFIGX# [StackPos2] "Codger\IP"][!Move #CURRENTCONFIGX# [StackPos3] "Codger\Traffic"][!Move #CURRENTCONFIGX# [StackPos4] "Codger\CPU"][!Move #CURRENTCONFIGX# [StackPos5] "Codger\HardDriveBar\HardDriveUsageBarC"][!Move #CURRENTCONFIGX# [StackPos6] "Codger\HardDriveBar\HardDriveUsageBarJ"][!Move #CURRENTCONFIGX# [StackPos7] "Codger\HardDriveBar\HardDriveUsageBarE"][!Move #CURRENTCONFIGX# [StackPos8] "Codger\HardDriveBar\HardDriveUsageBarK"][!Move #CURRENTCONFIGX# [StackPos9] "Codger\HardDriveBar\HardDriveUsageBarD"][!Move #CURRENTCONFIGX# [StackPos10] "Codger\HardDriveBar\HardDriveUsageBarL"][!Move #CURRENTCONFIGX# [StackPos11] "Codger\Volume"][!SetVariable LastY #CURRENTCONFIGY#][!SetVariable LastX #CURRENTCONFIGX#][!UpdateMeasure "DidItMove"]
DynamicVariables=1

[Background]
Meter=Shape
Shape=Rectangle 0,0,(#BarWidth# + (#BackPadding#*2) + 1),#Height# | Fill Color #PureYellow#,120
;LeftMouseUpActionAction=[!refresh]
LeftMouseUpAction=[!SetVariable LastX #CURRENTCONFIGX#][!SetVariable LastY #CURRENTCONFIGY#][!Refresh]
DynamicVariables=1
;UpdateDivider=-1
That's just the heart of a skin that is just the yellow bar at the top. You drag it the rest of the skins follow along. That was the goal anyway.

The [StackPosx] routines just provide the Y start of the next skin. Those work fine. A single click on the bar lines everything up correctly. Refresh does the same.

here's the weird:

1. Drag it and it follows along only horizontally not vertically.
2. Remove '[!UpdateMeasure "DidItMove"]' and it stops doing even that even though the measure should update every second anyway.
3. Remove '[!SetVariable LastX #CURRENTCONFIGX#][!SetVariable LastY #CURRENTCONFIGY#]' from the mouse click routine and it stops working even though the following [!refresh] should reset those variables anyway.

Mostly I want to fix the not tracking on the Y problem but if you can offer insight on the other strangenesses I'd love that.
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Real basic parameter question

Post by jsmorley »

Sorry, I can't go with you on this journey. To be honest, I fundamentally disagree with the premise, as a skin is a skin. It needs to be able to be dragged anywhere on the screen independently of any other, so you can arrange things as you like depending on your screen real-estate. While I understand the charm of breaking functionality up into different skins, I certainly do that, if you want them to move together, you need to put it all in one skin.

If you look at my "sidebar" setup, those are all separate skins, they can be arranged by the user to create a single sidebar effect, but can be arranged in any order desired, or some loaded and some not, or whatever the user wants. I make no attempt to treat them as one entity, other than "cosmetics". They do share colors and fonts and other things using @Include files.
1.png
If I want to move them all 3 pixels to the left I just CTRL-ALT click them to create a "drag group", and nudge them with the keyboard... But that is up to me as a "user" of the skin, not as the "author".

https://docs.rainmeter.net/manual-beta/arranging-skins/#Multiple

There are enormous logic and performance issues with having every skin constantly firing off a blizzard of !Move bangs to all other skins when it is moved. Aside from the sheer complexity of it, since every skin has to have a similar, but not identical, blizzard of !Move bangs, there can't be a "parent" skin, it will be "laggy" and ugly and take a lot of CPU.

So while to each his own, it is just so complex for me to create any kind of test environment where I can duplicate what you are trying to do, that I just don't have the cycles. In any case it just feels like trying to "brute force" Rainmeter into acting in a way it was not designed to do. Sorry.
You do not have the required permissions to view the files attached to this post.
User avatar
Codger
Posts: 97
Joined: May 29th, 2017, 3:16 pm

Re: Real basic parameter question

Post by Codger »

A person would still have the option of unloading that skin and using the individually skins normally. They aren't forced to use it. It is just a tool for those that want it. For me it was partly that there are three monitors and at different times I want it on different ones. Didn't know about the alt-click so moving 11 skins was a pain. And I wanted to see if I could do it.

I agree there would be no way for you to test it. I was hoping something would leap out at you in the coding.

Given the overhead it is probably best to go with what works already which is to position the header bar and then click it to align everything. Almost no CPU footprint and the same result except for the "coolness" of it moving as a block. Function over form.

Thanks for your view. It makes sense.
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Real basic parameter question

Post by jsmorley »

I have learned from painful experience over the years to never give any advice on code that I haven't actually seen run on my system, while watching the logs for errors and the skins panel to be sure measures and variables are getting the values I think they should. You can be pretty certain that any code I post to "help" here has been run on my machine.
User avatar
Codger
Posts: 97
Joined: May 29th, 2017, 3:16 pm

Re: Real basic parameter question

Post by Codger »

jsmorley wrote:I have learned from painful experience over the years to never give any advice on code that I haven't actually seen run on my system, while watching the logs for errors and the skins panel to be sure measures and variables are getting the values I think they should. You can be pretty certain that any code I post to "help" here has been run on my machine.
I'll bear that in mind when asking future questions in terms of the code I provide. I usually try to just stick to the germane parts.
[hr][/hr][hr][/hr]
"If you are the smartest one in the room, you are in the wrong room."