It is currently May 7th, 2024, 11:20 am

Running VBS script from button

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

Re: Running VBS script from button

Post by Yincognito »

LuciferVisuals wrote: April 19th, 2023, 11:59 amRight back in one of my first post Balala said something like "We all started with someone else's scripts and modified them".
Well, I actually wanted to reply then and tell him that I didn't start like that: I always prefer to start from scratch, whether it's about a skin or any other program / code I write (this is true for installations as well, I prefer clean installs over updates any day) - it just feels simpler and cleaner, without having to decipher what someone else wrote and all that. Of course, that doesn't mean I didn't copy pasted small bits of code from somewhere else and adapted for my use, just not an entire project.

Anyway, when it comes to code attribution and such, I think in general the minimum one should do if the project is very similar to the original, is to give credit to the original author somewhere - it's common sense, especially in the free open source environment. If the "fork" differs substantially from the original, then I guess giving credit becomes somewhat optional. I think the biggest issue that an author would hate is for someone to copy paste 90%+ of his code and pretend it's his own, and this percent is probably inversely proportional with the complexity of it.
LuciferVisuals wrote: April 19th, 2023, 12:35 pmThe stargate skins I have seen dont have the "Whoosh" Effect on the portal when it opens, I haven't tried yet but think I can see how that's done, and will plod away with that myself unless I get stuck.
Not sure what you mean by "whoosh effect" - maybe something like this?
Image
Don't know if it's been already done in Rainmeter, you'd have to see for yourself, but this is just a GIF from the internet, from which you can extract frames and use either a Bitmap meter or an Image one to "play" them. Obviously, since both can take a simple Calc measure output to instruct Rainmeter which frame to play, playing stuff just once is a matter of stopping incrementing a number. Or, there is the Loop measure that can do it "by default" if you set the LoopCount option properly.
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 19th, 2023, 1:36 pm simpler and cleaner, without having to decipher what someone else wrote and all that.
Amen to that !!!
Anyway, when it comes to code attribution and such, I think in general the minimum one should do if the project is very similar to the original, is to give credit to the original author somewhere - it's common sense, especially in the free open source environment. If the "fork" differs substantially from the original, then I guess giving credit becomes somewhat optional. I think the biggest issue that an author would hate is for someone to copy paste 90%+ of his code and pretend it's his own, and this percent is probably inversely proportional with the complexity of it.
That pretty much sums up my understanding of it (as I did with the Childlock) Funny I was wondering how much had to change before you could consider it yours, I think your answer makes that about as clear as a grey area could get.

Not sure what you mean by "whoosh effect" - maybe something like this?
TcV5.gif
Yep that's the Whoosh, I haven't seen it done in Rainmenter but thought it would be cool to use when turning a Stargates on, as opposed to literally the pool of water suddenly appears, then turn it off and it's gone, I thought if you are going to do it, do it right. I'm better at graphics than code so was up for giving it a go.

I can extract all the frames from that or from an actual mp4 video (better quality) in irfanview, which is basically like photoshop, (but free). Every frame would need editing but irfanview can edit hundreds of files in a batch process, so once you have worked out what you need to do to the first frame, the software will repeat it on ecvery frame you have extracted, so in theory, that's the easy part. (famous last words). I knew I had seen a link somewhere to what to do with them once you have made them, that's prob the link you put below, Thanks saves me finding it.
Bitmap meter or an Image one to "play" them.
Obviously, since both can take a simple Calc measure output to instruct Rainmeter which frame to play, playing stuff just once is a matter of stopping incrementing a number. Or, there is the Loop measure that can do it "by default" if you set the LoopCount option properly.
I'm very shaky on the last bit. I found something that works by luck and simply carried on using it. so I'll have to read up on that, but I'll come back if I get stuck.

Thank you again for all your time, How on earth do you find the time to do this? Is it a paid job, or are you a masochist, LOL

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

Re: Running VBS script from button

Post by Yincognito »

LuciferVisuals wrote: April 19th, 2023, 2:25 pmThank you again for all your time, How on earth do you find the time to do this? Is it a paid job, or are you a masochist, LOL
If you don't find time to do what you like, you lived for nothing. There must be a balance between what you do because you have to and what you do because you want to, or else by the time you'll regret it, it'll be too late. That being said, I also wondered the same about your typing skills (dog must be jealous on Rainmeter ATM)... :lol:

Anyway, philosophy and joking aside, feel free to ask if you get stuck on this. It shouldn't be hard at all, though I'm not sure why you'd need to edit the frames ... unless it's about making the background transparent or resizing, that is. Both of them can be handled within Rainmeter (selective transparency via Container meters, resizing via W and H adjustment), but it's true that it's more efficient to set the size beforehand, as doing it in Rainmeter has a considerable impact on performance, especially on large images / skins and lower update rates (using the ActionTimer plugin in the animation doesn't change this).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16201
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Running VBS script from button

Post by balala »

LuciferVisuals wrote: April 18th, 2023, 9:19 pm I have learned more from you that you can ever realise. I think I will benefit more from some of you advice when my coding gets better to be honest, Looking at it, it even looks to me as though I understand more that I really do, or perhaps I do understand more than I think, I just need to do more at this level to become more familiar with what I am doing before I add new coding concepts. New ideas are ok, like my help screen, providing I can do it with the code I already know, It's not hard work. Obviously I'll add the odd new bit of code when absolutely necessary. I'm sure once I stop getting confused about what I already know, I'll be more than keen to push ahead
I'm glad if you think so. Believe me, if you keep working, after a longer or shorter period (depends on many), you get developed a work skill, which lets you working much easier and better. The only thing which can help you on getting this, is the exercise, which you get by working. So, go ahead...
LuciferVisuals wrote: April 18th, 2023, 9:19 pm On another subject, I had a disaster this morning, I was using Notepad++ to put square brackets round all my Bangs, It really screwed things up big time. I had made a backup before doing it, but the code had changed so much in between times, that when I put the help screen bit in I was getting dozens of red error messages. Everything worked perfectly though. I only found them because atm I check that log often. Anyway it's taken the entire day to get rid of them all.
Sorry about that.
Maybe this is a stupid question at this point, but did you get working properly the hiding and showing the help (described here)? Or this has also been affected by the loss?
LuciferVisuals wrote: April 18th, 2023, 9:19 pm Anyway as always thanks for your time.
You're welcome. It's always a pleasure to help, when I can.
User avatar
Yincognito
Rainmeter Sage
Posts: 7207
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Running VBS script from button

Post by Yincognito »

LuciferVisuals wrote: April 19th, 2023, 2:25 pmI'm very shaky on the last bit. I found something that works by luck and simply carried on using it. so I'll have to read up on that, but I'll come back if I get stuck.
Just for fun, since I already had the main bits here and there in my skins and Photoshop did the rest automatically... 8-)

Code: Select all

[Variables]
SlowUpdate=1000
FastUpdate=25
Frames=154
Speed=1
Size=352
Edge=15
Glow=0.0157
EdgeColor=0,0,0,255

[Rainmeter]
Update=#SlowUpdate#
AccurateText=1
DynamicWindowSize=1

---Measures---

[Slider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Pause | Wait #FastUpdate#
ActionList2=Slide | Wait #FastUpdate#
ActionList3=Slide | Wait #FastUpdate# | Rerun | Wait #FastUpdate#
Pause=[!CommandMeasure #CURRENTSECTION# "Stop 2"][!CommandMeasure #CURRENTSECTION# "Stop 3"]
Slide=[!UpdateMeasureGroup #CURRENTSECTION#Group][!UpdateMeasure #CURRENTSECTION#][!UpdateMeter *][!Redraw]
Rerun=[!CommandMeasure #CURRENTSECTION# "Stop 2"][!CommandMeasure #CURRENTSECTION# "Stop 3"][!CommandMeasure #CURRENTSECTION# "Execute 3"]
DynamicVariables=1

[Frame]
Group=SliderGroup
Measure=Loop
StartValue=0
EndValue=#Frames#
Increment=#Speed#
LoopCount=1
UpdateDivider=-1
RegExpSubstitute=1
Substitute="^(.*)$":"00\1","^.*(.{3})$":"\1"
DynamicVariables=1

---Meters---

[Container]
Meter=Shape
Shape=Ellipse (#Size#/2),(#Size#/2),(#Size#/2-#Edge#),(#Size#/2-#Edge#) | Fill RadialGradient EllipseGradient | StrokeWidth 0 | Stroke Color #EdgeColor#
EllipseGradient=0,0 | 0,0,0,255 ; 0.0 | 0,0,0,255 ; (1-#Glow#/(1+#Glow#)) | 0,0,0,128 ; (1-#Glow#/(1+#Glow#)) | 0,0,0,0 ; 1.0
UpdateDivider=-1
LeftMouseUpAction=[!CommandMeasure Slider "Stop 1"][!CommandMeasure Slider "Stop 2"][!CommandMeasure Slider "Stop 3"][!CommandMeasure Slider "Execute 3"]
MiddleMouseUpAction=[!CommandMeasure Slider "Stop 1"][!CommandMeasure Slider "Stop 2"][!CommandMeasure Slider "Stop 3"][!CommandMeasure Slider "Execute 1"]
RightMouseUpAction=[!CommandMeasure Frame "Reset"][!CommandMeasure Slider "Stop 1"][!CommandMeasure Slider "Stop 2"][!CommandMeasure Slider "Stop 3"]

[Woosh]
Container=Container
Meter=Image
ImageName=#@#[Frame].jpg
DynamicVariables=1
StargateWoosh_1.0.0.rmskin
Left click to "play", middle click to "pause", right click to "stop". Since right click is taken by an mouse action, you'd have to press CTRL+RClick to trigger the Rainmeter's context menu and the like. This is a general form of it from my perspective, adjustments can be made (and probably should be made) for a more personalized look or behavior.
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: Running VBS script from button

Post by LuciferVisuals »

Yincognito wrote: April 19th, 2023, 3:04 pm That being said, I also wondered the same about your typing skills (dog must be jealous on Rainmeter ATM)... :lol:
Are they bad? I was in a backward class at school, in the juniors school my teacher said I would never learn to read and write. This was before they discovered dyslexia, turns out that while I suffer from that I'm reasonable smart, after I retired I did some study courses for fun, ended up being given a scholarship to do an accelerated Masters Degree, then got awarded a Doctorate. I would love to meet her now and introduce myself as Doctor Maltman, just to see her face, but sadly she has long gone so I won't ever get the chance. It's a miracle I can write any code, it's not very forgiving if you get even one single character in the wrong place, Also probably explains why I learn by trial and error, as opposed to reading the manual.

Everyone here has been unbelievably helpful, I'm not used to it TBH.

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 19th, 2023, 3:12 pm Did you get working properly the hiding and showing the help (described here)? Or this has also been affected by the loss?
No. I did post my solution you must have missed it. I had complicated the situation by using two buttons activating and deactivating them...

The solution was stupidly simple, throw all that away and simply toggle one button.. Worked perfectly first time every time.

Thank you again..... I have asked you a question in another forum about animating Gifs, it was in response to the answer you had given another forum user.So I wont repeat it here, you will have the full context in the right place.

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

Re: Running VBS script from button

Post by LuciferVisuals »

Yincognito wrote: April 19th, 2023, 5:06 pm Just for fun, since I already had the main bits here and there in my skins and Photoshop did the rest automatically... 8-)

Code: Select all


Just for fun I knocked this out over breakfast.... Might save you working on it for a week..... Showoff.... Lol.

Thanks downloaded it will look in a min.



ON AN UNRELATED MATTER SHOULD THAT LITTLE YELLOW BELL TOP RIGHT TELL ME WHEN I HAVE MESSAGES, 

If so it's not working very well, it said I have one message, turns out there are about 4, this has caused me to miss some in the past. Does it need setting or something? Have I broken it.? Am I assuming it should do more than it does?

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

Re: Running VBS script from button

Post by balala »

LuciferVisuals wrote: April 19th, 2023, 5:35 pm No. I did post my solution you must have missed it. I had complicated the situation by using two buttons activating and deactivating them...

The solution was stupidly simple, throw all that away and simply toggle one button.. Worked perfectly first time every time.
Alright, if you found the solution.
LuciferVisuals wrote: April 19th, 2023, 5:35 pm Thank you again..... I have asked you a question in another forum about animating Gifs, it was in response to the answer you had given another forum user.So I wont repeat it here, you will have the full context in the right place.
I know I replied to such questions more times, however I don't know which one are you talking about right now. But doesn't even really matter, especially if you got the proper answer of your question. Did you get ti?
User avatar
Yincognito
Rainmeter Sage
Posts: 7207
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Running VBS script from button

Post by Yincognito »

LuciferVisuals wrote: April 19th, 2023, 5:28 pmAre they bad?
No, quite the contrary: they're very good and very... productive - which is a good thing, of course. :D
LuciferVisuals wrote: April 19th, 2023, 5:28 pmI would love to meet her now and introduce myself as Doctor Maltman, just to see her face, but sadly she has long gone so I won't ever get the chance.
Yeah, we all have such moments in our lives, where we'd like to prove others were mistaken about us. Me, I'd like my high school math teacher to be enraged at knowing that I'm much better at that than she imagined and wanted me to be. I barely passed courses with her (to be honest, it was partly my fault, didn't like doing homeworks or learn to please others, lol), while I was doing function graph plotting and complex function operations on my computer, and now ventured as far as space simulations in 3D. That's the past though, what matters most is that one knows he succeeded, what others think is way less important, to say the least. They can keep their negativity for themselves.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth