It is currently June 23rd, 2024, 11:57 pm

General Help with my first Project

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

Re: General Help with my first Project

Post by Yincognito »

LuciferVisuals wrote: May 9th, 2023, 7:24 amSo if @inc1 had a variable not previously "detailed?" or specified in the skin base code it would insert it.. All good so far.
If @inc 2 likewise had different not previously "detailed?" or specified it would insert that.. All good so far.

What IF.... for example unintentionally @inc3 contained a variable not previously "detailed?" or specified in the base code of the skin, But detailed to be inserted inserted by @inc1 or @inc2?

Would it not insert it because one of the other calls did it first, or would the last one i.e. inc 3 be used and the previous instruction ignored? or another outcome?
I don't know exactly what "inserted" or "detailed" are supposed to mean, but if @inc1 or @inc2 defined a variable and then @inc3 defines it again, the latter will be considered. It's always the last one that "wins" here, according to the order the code is written in your skin and its dependencies. It's like saying I sell you a PC for $100, then changing my mind and saying $150 - the last price is what you'll have to deal with.

P.S. Exploring hypothesis can be done forever, but in practice, a simplified / shorter version of such a code is more revealing, for both the helper and the helped one. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 9th, 2023, 9:39 am It's always the last one that "wins" here, ........ in practice, a simplified / shorter version of such a code is more revealing, for both the helper and the helped one. ;-)
Thanks I could see logic for either, and work with either, just preferred to find out before rather than later.

And yes that's why I was going to jump in at the deep end and make a start on it, cross all the other bridges as I arrive at them.

Computer fixed BTW. Pounding headache though. But still intend making a start on the code today.

Thanks for clarification on the @include part.

keith
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 9th, 2023, 9:39 am
Hi well made a start, and restarted a few times so far, going round in circles, but will get there.

Have also been playing with you example, which is exactly what I needed to try and get my head around how I have to structure this.

The one thing I would ask is about the overwriting whats all ready there.

I NOW know how not to do that. Unfortunately rainmeter appears, (at least in the example you made for me) to default to doing exactly that, (which was the problem I was having before).

If you go into Advanced settings, and disable backup, it works perfectly, exactly what I need it to do. But if you don't and just click install, then it over writes what was there (something a novice would be quite likely to do). Is there a way, or can you think of anything that would force the user to go into advanced settings? Obviously the skin could contain warnings about it..... BUT they wouldn't see them until they had installed it, even a "WARNING READ ME FIRST" they wouldn't see until too late.

Meanwhile, I will go back to trying to get some code down, If this is what I have to work with, then so be it, but thought I would ask if there is a way to "fool proof" the installation once done, (withing Rainmeter), I know I could fairly easily do it with a batch file, but I'll keep that as a last resort).

Keith
User avatar
Yincognito
Rainmeter Sage
Posts: 7491
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: General Help with my first Project

Post by Yincognito »

LuciferVisuals wrote: May 10th, 2023, 7:43 amObviously the skin could contain warnings about it..... BUT they wouldn't see them until they had installed it, even a "WARNING READ ME FIRST" they wouldn't see until too late.
Well, you could write the warning in the description of your skin(s) here on the forum and / or on DeviantArt, which will presumably be read by the user before downloading and installing the skin (just keep it compact, since many don't like to read walls of text). Alternatively, you could photoshop a header image (also at Step 3: Advanced on the page) to include a short warning if there is enough space, along with some nice stargate theme (see the image below the window title bar):
Image
Or, you could simply name the .rmskin accordingly, i.e. "Main Skin_1.0.0_Part_3 (untick Advanced - Backup Skins at installation as a patch).rmskin".

That being said, don't take my word for granted just because it works (well, mine always works lol, but you get the idea). Many times in Rainmeter, there are multiple ways to do something, and you should at least try the Merge Skins variant (same Step 3: Advanced on the page linked above) as advised, before you discard the possibility, because it represents a viable alternative that doesn't require the user to do anything, especially if you keep files from your "modules" / "parts" mostly separated, i.e. no or few duplicate files between parts. It won't work with the Variables Files option, of course, but if by any chance you don't need the latter in the first place, no harm done.

For example, I packaged the 3rd part (the flying pigs one) below by ticking Merge Skins, and the result is precisely the same as my previous variant (same skin version as before):
Main Skin_1.0.0_Part_1_2.rmskin
Main Skin_1.0.0_Part_3.rmskin
In case you didn't notice, there is one common file (...\@Resources\a.png) between the two .rmskins, in both the earlier variant and this one, which gets overwritten with another image (but same image file) once you install the 3rd part. I intentionally included it this way, so that you can see both sides of the coin, so to speak. If the potentially overwritten files don't impede the functioning of the first .rmskin, then again, no harm done (you'll have to structure things wisely for that to happen, of course). You can easily see what's inside the .rmskin, even without installing, by temporarily adding the ".zip" extension to the package and explore it (you can even copy all files and do a manual install that way if you really want to, but obviously packing a folder to a .zip and then renaming it to .rmskin won't work).
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 10th, 2023, 1:14 pm
Thank you, Ill give all of that consideration, I'm finally started, so don't want to get side tracked atm, I'll go back to that. after all there is a saying here in the uk "It is what it is"
etc
On the batch file approach, each new skin could be in LP2,\ LP2\ as opposed to LucifersPlayground\ so could be installed without risk, (in lp1/LP23 etc) but it could also contain a Batch file in it's root called install-me.bat. That could then "optionally" copy it into LucifersPlayground, without risk..... Just a thought.

But I decided to actually get some stuff done and working, then come back to worry about installing.

That said, It is a potentially bigger issue than it looks, for example if a user had spent considerable time customizing the Remote Control for example, to do everything they want, they would not be best pleased if a new skin deleted it all, even if it was because they didn't read the instructions. They could reinstall the skin, but would lose all their customizing. So they still would not be happy.

Keith
User avatar
Yincognito
Rainmeter Sage
Posts: 7491
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: General Help with my first Project

Post by Yincognito »

LuciferVisuals wrote: May 10th, 2023, 7:43 pm Thank you, Ill give all of that consideration...
:thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 10th, 2023, 8:05 pm:thumbup:
Focusing on actually writing the code for this atm... As you can imagine, lots of new things to work out, but so far I have managed to sort them all without having to ask, so even though it's been a bit slow going, I'm really quite pleased with the progress.

It kinda goes without saying that this is the type of project that is a bit open ended, And I know you said you would rather not see bits and pieces, so I wont send anything yet, but I will soon have the Welcome section finished, so I send that when its done.... I contains pretty much most of the "Magic" that will actually make this work.

I will then have to revise and finish off all the experimental things I previously worked on, and then when compatible put them in the playground, so there is some point to it LOL.

Feeling really good about this....... And so far........ No buttons :lol:

Keith
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 10th, 2023, 8:05 pm:thumbup:
Actually everything is working, but I do get an error message when tying to read info from @include files that have not been installed, doesn't stop anything working, trying to think of a way round it though.

Is there any way to make an @INCLUDE. Conditional for example with an if statement first, as |I can use my filecount detector to produce an
ifabove= or below come to that, but not sure how to get the include into it, I checked both the IF statement and Include section of the manual but making include conditional wasn't mentioned.

Keith
User avatar
Yincognito
Rainmeter Sage
Posts: 7491
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: General Help with my first Project

Post by Yincognito »

LuciferVisuals wrote: May 13th, 2023, 7:26 pm Is there any way to make an @INCLUDE. Conditional for example with an if statement first, as |I can use my filecount detector to produce an
ifabove= or below come to that, but not sure how to get the include into it, I checked both the IF statement and Include section of the manual but making include conditional wasn't mentioned.
I don't think there is. I mean, you can in fact have an IfCondition in an early measure from the skin, and use !WriteKeyValue to write different @includes in their respective sections, but you'll have to !Refresh afterwards to "apply" the changes.
LuciferVisuals wrote: May 13th, 2023, 3:13 pm It kinda goes without saying that this is the type of project that is a bit open ended, And I know you said you would rather not see bits and pieces, so I wont send anything yet, but I will soon have the Welcome section finished, so I send that when its done.... I contains pretty much most of the "Magic" that will actually make this work.
I was thinking more to posting the skin in the Share Your Creations section of the forum once you finally release it and focusing the hypothetical uploads on things you can't do in the meantime. After all, you're the main beta tester of your skin, generally the others' impressions come after a potential release.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: General Help with my first Project

Post by LuciferVisuals »

Yincognito wrote: May 14th, 2023, 10:00 am I don't think there is. I mean, you can in fact have an IfCondition in an early measure from the skin, and use !WriteKeyValue to write different @includes in their respective sections, but you'll have to !Refresh afterwards to "apply" the changes.


Yeak tried that, you will see why its a nightmare when you see the code for this. I foumnd a different way to achieve the same thing, Not what I originally wanted to do, but it works and the result is the same.... Not so good for new skins things I have not even thought of yet, but will cross that bridge when I come to it.
I was thinking more to posting the skin in the Share Your Creations section of the forum once you finally release it and focusing the hypothetical uploads on things you can't do in the meantime. After all, you're the main beta tester of your skin, generally the others' impressions come after a potential release.
Absolutely...... The only problem with that is, the basic structure of the whole thing needs to be in place first, and almost there with that..... But without a few add ins its not very exciting..... It looks like a lot of code that does not do much..... Well it doesn't, of course, it wont do anything unless you have some other compatible shins to take advantage of so it can share their resources IF they are there...... Without some to share, you would not see it do anything. So I have to revise and finish some of the stuff I have been playing with, to have a few skins to immediately plug into the playground, so people can see what it actually does, (above and beyond what's immediately obvious "without add ins")

That said once I finish the main basic structure of this, it wont take long to finish off a few of my earlier experimental projects, and make a few revisions to them to be compatible with the resource sharing protocols.

But yes, as soon as there is something Worth putting out, then that's exactly what I will do. But it has been a bit of a chicken and the egg situation, until now.

Keith