It is currently March 29th, 2024, 7:00 am

Running VBS script from button

Get help with creating, editing & fixing problems with skins
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Running VBS script from button

Post by LuciferVisuals »

Yincognito wrote: April 21st, 2023, 12:30 am Hi
First big difference if you are using Jpg for Whoosh, I was using Png. How do you get the transparent effect with a Jpg ? is that Rainmeter Masking it or does P'shop make transparent Jpegs. I haven't tried to do it..... Because I was told it wasn't possible. But if it's possoble I'll work out how if you point me in the right direction, they are much smaller files.

Keith
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Running VBS script from button

Post by balala »

LuciferVisuals wrote: April 21st, 2023, 8:16 am How do you get the transparent effect with a Jpg ? is that Rainmeter Masking it or does P'shop make transparent Jpegs. I haven't tried to do it..... Because I was told it wasn't possible. But if it's possoble I'll work out how if you point me in the right direction, they are much smaller files.
It's not possible. The jpg (jpeg) image format doesn't support alpha channel, so an image of this format can't have transparent parts. both png and gif can, but jpg can't handle transparency.
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Running VBS script from button

Post by LuciferVisuals »

balala wrote: April 21st, 2023, 9:26 am It's not possible.
Thanks, that's what I thought, it looked like Yincognito had done it. Obviously not. Thanks for saving me wasting time.

Is the maximum size RMskin I can Upload 10 Megs, I started at 29 Mb I have got it down to about 14, but still says too big. ?

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

Re: Running VBS script from button

Post by LuciferVisuals »

balala wrote: April 21st, 2023, 9:26 am It's not possible.
Check this out, its without the water effect, but I have attached a separate zip file so you can put the water effect back in the pool directory. I can get this under 10 MB without losing quality, Unless you have any advice on that matter , Oh wise one :)

Lucifer aka keith
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Running VBS script from button

Post by Yincognito »

LuciferVisuals wrote: April 21st, 2023, 7:02 am Hmmm.... I deleted it, made a new layout from an empty layout and its back?
I have no idea what you deleted if you don't specify it. I was referring to editing (or even deleting) the layouts from the C:\Users\[User]\AppData\Roaming\Rainmeter\Layouts folder, and not the active one in the C:\Users\[User]\AppData\Roaming\Rainmeter folder. The former are "user saved" and can be manipulated freely (including deleting them), the latter is the active one in Rainmeter and bar editing it will probably be recreated if deleted, because it's needed.
LuciferVisuals wrote: April 21st, 2023, 7:02 am Sidebar... Does this have an undo button ?, Just deleted more than intended, and couldn't see one? [...] Simple is good, so (that was the part I accidentally deleted)
Again, I don't understand what you deleted, only you know, because you didn't specify precisely. :confused:
LuciferVisuals wrote: April 21st, 2023, 8:16 am First big difference if you are using Jpg for Whoosh, I was using Png. How do you get the transparent effect with a Jpg ? is that Rainmeter Masking it or does P'shop make transparent Jpegs. I haven't tried to do it..... Because I was told it wasn't possible.
Yes, I intentionally used JPGs to lower the skin size. I do this in my other similar projects, because in general, one can use a container to mask the unwanted parts anyway. JPGs don't have a transparency channel, while PNGs do, but fortunately in these cases Rainmeter can achieve the same via masking. So, it's always possible to do what you want, one way or another, the trick is to find the way to do it. And this has been demonstrated time and time again in countless cases (you know, boxes vs thinking and such).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Running VBS script from button

Post by Yincognito »

What specifically you don't understand from the Woosh example earlier?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Running VBS script from button

Post by LuciferVisuals »

Yincognito wrote: April 21st, 2023, 10:46 am What specifically you don't understand from the Woosh example earlier?
It's brilliant, but has so many things I have not used, and never even see before. It's another level, of coding and I'm nowhere near it yet. My immediate reaction was I didn't understand any of it. BUT I will admit that at the time I just read it, and was more focussed on the optical effect, (and how quickly you knocked it out). And how I could get rid of the stargate and keep the Whoosh. I have not tried to pull it apart and find out how it works yet. I think I keep underestimating myself, everytime I see something totally new I think WTF, but after a couple of hours it begins to make sense. Let me have a play with it and see what I can understand and then Ill come back you with some specific questions.

In the mean time when you have a mo (as if) take a look at mine it's a totally totally different approach, but there is often more than one way to skin a cat. LOL.

I'm a bit more relaxed now because I just got mine working properly and managed to more than half it's size, so feeling back on track.But might l;eave if today and start afresh tom, whit what I was going to do today.

OH the water effect isn't supposed to go there,(But I wanted to learn how to do it for my stargates) that's where the scrolling star wars text is going to go as credits, to people, I wanted to thank... yourself included, I have not finished working out what I want it so say yet, but it's humorous, and obviously I need to think ahead, because I wont want to revise that unless essential, due to the work involved. So I put the Event Horizon is as a proof on concept that I could put something animated in that space.

I did wonder about the line you got me to add to your code to save CPu work, I just blindly obeyed your instructions, and have been too busy to try and work out what it does, so I just pasted it into your script. But it did make me think perhaps I should start thinking about that as well with animations?

The attachments are just for you to play with when you have time. No specific questions or problems, but any input is more than welcome.

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

Re: Running VBS script from button

Post by Yincognito »

LuciferVisuals wrote: April 21st, 2023, 11:36 am It's brilliant, but has so many things I have not used, and never even see before. It's another level, of coding and I'm nowhere near it yet.
No, it's not. It's quite simple. BUT, in general, for someone just starting with something, there are a few guidelines that should be followed, IMHO:
1) the key in doing something is to first understand how it works
2) because of the above, it's preferable to:
a) start simple, with just the element(s) you need to understand
b) start from scratch with them, i.e. from a blank file to writing those element(s) yourself
c) use the documentation available, aka the manual, when needed
d) if you're going to use other bits of code, do not proceed further until everything from them is clear
e) if you're going to use other bits of code, adjust their parameters (in this case, the variables) to see what they do
3) the key in completing something is to know exactly what you want to get to
In this case, the only element in the code that's slightly more "complex" is the ActionTimer measure, and that's only because it's a bit outside the box in the way it uses the plugin to repeat things ad infinitum, i.e. Action3 and the Rerun options. The rest is just standard stuff, really, but you can't expect to know how to do it if you don't examine the code, play with the parameters, or try to replicate an even simpler version of it yourself from scratch.

In the code, [Frame] is iterating from 0 to the number of frames, [Container] is masking out the outside of a disk about the size of the stargate by drawing a opaque ellipse to show the interior and letting the rest transparent to hide the exterior, [Woosh] is displaying the .jpg based on the active frame number from the corresponding measure and masking it based on the container, and [Slider] is updating the relevant sections and redrawing the skin once every #FastUpdate# milliseconds.

If the woosh wasn't "overflowing" the stargate at its edges, keeping only the former would have been easily achievable by increasing the Edge variable to something like 60 (pixels). What such an increase does is simply lower the radius of the ellipse from the container via the (#Size#/2-#Edge#) formula, in effect making the shown part (i.e. disk area) of the .jpg smaller. The Glow variable is a remnant of one of my codes to more or less "blur" the edges of the shown disk area to make them fuzzier. The rest of it is just plain English, really.

Regarding the two IfCondition lines I recommended to be added to the code, that is not required if you're using an ActionTimer measure in a standard way - adding them is simply an effect of my initial "thinking outside the box" design of that measure for endless animations and not specifying there when it should stop with the repeating of the update+redraw system used in the animation (thus, having to test whether that moment came outside the [Slider] measure, in the IfCondition from the [Frame] one). So no, if you don't use the same approach I did with the ActionTimer measure, you don't need to add similar lines to processes involving them. That part is usually, in a standard implementation, handled by the Repeat Count Number values mentioned in the explanation from the manual. Since I don't use such an approach here, I need to check it out someplace else, like already described above.
Last edited by Yincognito on April 21st, 2023, 1:37 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Running VBS script from button

Post by Yincognito »

LuciferVisuals wrote: April 21st, 2023, 11:36 amIn the mean time when you have a mo (as if) take a look at mine it's a totally totally different approach, but there is often more than one way to skin a cat. LOL.
Good idea, an alternative way to what I described earlier with shrinking the opaque area of the container. Not a woosh, just the water, but it looks just as nice - well done. In the container variant, if there was no overflowing of the woosh on the stargate, you could have selectively chosen to display either the water thing inside or the stargate by adjusting the Shape of the container from a smaller fully filled "disk" to an outside "ring" with the inside transparent, like this:
Image
This way, you'd be able to use a single frame set to animate things and show what you want from it. It saves time, it saves space, it's flexible in case you want to adjust things. When it comes to containers, Rainmeter will use the opaque pixels and the transparent ones in the Container meter to show and hide, respectively, corresponding parts of the contained meter.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Running VBS script from button

Post by LuciferVisuals »

Yincognito wrote: April 21st, 2023, 1:28 pm
Yes I guessed that was how you masked the image, I think its called a "Matte" I have been using a similar technique, on some things. Using the flood fill (painpot) to green screen an object, (so you can use green as a transparent colour often leaves less than perfect edges, as stargates are round, I have made some green circles and rings a black background, then made black transparent. This way I can overlay my green circle or ring, to get nice sharp edges, then flood fill (paint pot) whats left. Obviously it doesn't have to be green it can be any colour depending on the colours in the image.

There are two reasons I'm trying to do this with PNG in preference to JPGs.

First, I didn't think of screening the JPG until much later.

Secondly that method looks increasingly difficult with irregular images. For example when the wormhole closes as it disappears, I have no doubt you could improve it but atm your water disappears against a black background, whereas with a png it could easily disappear against against what looks like "thin air", just like the real one does, because the black would be the final transparent colour. But I haven't got to that part yet, I'm also new to all this computer graphics, but now I am finding that easy,not only are my images are constantly getting better IMHO, but I am getting really quick at doing them, they are just a joy to do, pure fun, very little effort involved.

Anyway as usual thank you for your valuable time and for using so much of it on me, I do appreciate it.

Keith