It is currently April 19th, 2024, 10:59 am

(Need Help)Show a text and image on windows startup and auto hide it.

Get help with creating, editing & fixing problems with skins
Oyojo
Posts: 10
Joined: July 24th, 2017, 11:01 am

(Need Help)Show a text and image on windows startup and auto hide it.

Post by Oyojo »

Hey Guys....I was just making quite a big project on rainmeter... I wont reveal it yet.... :P (I will if i even do it..)

(As a part of the project) I want to make a skin that shows a text and an image when windows boots up (windows 10 btw)....
And wait for like 10 seconds or so and then deactivate automatically..
I know there's a lot of other threads on this probably.. but i cant figure them out cause i'm kind of new to making skins in Rainmeter

Thanks....

I do need help in some other stuff but i'm quite shy to make a big post with a bajillion number of text...
ill ask about them one bye one :)..on this post... :D :D
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: (Need Help)Show a text and image on windows startup and auto hide it.

Post by balala »

Oyojo wrote:I want to make a skin that shows a text and an image when windows boots up (windows 10 btw)....
And wait for like 10 seconds or so and then deactivate automatically..

Code: Select all

[Rainmeter]
Update=1000

[Variables]
WaitFor=10

[MeasureTimer]
Measure=Calc
Formula=( MeasureTimer + 1 )
IfCondition=(#CURRENTSECTION#=#WaitFor#)
IfTrueAction=[!HideFade "#CURRENTCONFIG#"]

[MeterImage]
Meter=Image
ImageName=...

[MeterString]
Meter=String
Text=My string.
The skin with the image and the string will be visible for a number of seconds equal with the value of the WaitFor variable.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: (Need Help)Show a text and image on windows startup and auto hide it.

Post by jsmorley »

One thing I might suggest is that there is a way to get closer to "when the PC is rebooted" than just a Calc measure that increments itself. The minor downside to that approach is that that will be executed any time Rainmeter or the skin is "refreshed". That might be many times during the day, and would likely be somewhat disconcerting / annoying for a "Welcome" skin.

We can get a bit closer by only executing things when the skin is "loaded". which is more likely to be once when the PC is restarted.

https://forum.rainmeter.net/viewtopic.php?p=119586#p119586

The long and the short of it is that I think the Counter function in Rainmeter, which is not reset unless the skin is unloaded, might work better for this.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
SecondsVisible=10

[MeasureBeenLoadedFor]
Measure=Calc
Formula=Counter
IfCondition=MeasureBeenLoadedFor>=#SecondsVisible#
IfTrueAction=[!HideFade]

[MeterWelcome]
Meter=String
FontSize=12
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Welcome
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: (Need Help)Show a text and image on windows startup and auto hide it.

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
SecondsVisible=10

[MeasureBeenLoadedFor]
Measure=Calc
Formula=Counter
IfCondition=MeasureBeenLoadedFor=1
IfTrueAction=[!Move "((#SCREENAREAWIDTH#/2)-150)" "((#SCREENAREAHEIGHT#/2)-50)"][!ZPos "2"]
IfCondition2=MeasureBeenLoadedFor>=#SecondsVisible#
IfTrueAction2=[!HideFade][!PauseMeasure MeasureBeenLoadedFor]

[MeterBack]
Meter=Shape
Shape=Rectangle 0.75,0.75,300,100,12 | StrokeWidth 1.5 | Stroke Color 255,255,255,255 | Fill Color 47,47,47,255
UpdateDivider=-1

[MeterWelcome]
Meter=String
X=150
Y=50
StringAlign=CenterCenter
FontSize=16
FontWeight=700
FontColor=255,255,255,255
AntiAlias=1
UpdateDivider=-1
Text=Welcome#CRLF#To#CRLF#Rainmeter
GIF.gif
:-)

Note: The !PauseMeasure and UpdateDivider=-1 on the measure and meters is really a bit anal-retentive, but once the number of seconds to be visible is reached, in a perfect world we want this skin to hide, go to sleep, and use as close to zero resources as possible. We can't "unload" it, as then it won't be loaded again when you restart Rainmeter, but there is no reason for it to be using even a billionth of a CPU cycle watching that Counter or updating meters.

The skin will only use any resources at all when first loaded, when it will display the meters and count to 10, then only again if the skin is refreshed, when it will simply check the Counter once, which will always be above 10, and go right back to sleep without doing anything else.
You do not have the required permissions to view the files attached to this post.
Oyojo
Posts: 10
Joined: July 24th, 2017, 11:01 am

Re: (Need Help)Show a text and image on windows startup and auto hide it.

Post by Oyojo »

Thanks for the quick reply, it works like a charm :thumbup: :thumbup:

Now starts my list of a bajillion ideas i need help in......

1) I want to add a delay for all the rainmeter skins i have, except for the textandlogo.ini (text and logo at startup)....
A command that i can add individually to all my skins (for delaying its startup time) will be good enough :D

2) This effect? --> https://gfycat.com/HighlevelLeftEstuarinecrocodile
I'm also making a game launcher.. so can i make it zoom twice like that? [First the launcher (after the delay) starts zoomed
out, then it zooms in all the icons, then it zooms in, a second time but only for the icon that is selected (the whats new icon)]

3) Make the Icon zoom (only the icons) as a mouse over effect? + [Move left (through icons) with, left arrow and move right (through icons) ,with right arrow?]
I tried taking an icon and changing its size on mouse over but it zoomed from the top left which looks kinda weird..
I just want it to expand from the middle, increase its width a little and increase its height more.. (like on the gif)

4) A skin which at first shows my steam profile and name.. then clicking on it hides all the other rainmeter skins and excecutes
Steamprofile.ini [a skin that will show my steam stats (which i don't know how to make)] which will open and show my badges, levels, etc....(as text and numbers)
[Cough cough webparser cough cough too complicate..d.. cough fo..r me cough]

5) (Optional) A skin that would show me notifications for steam (only text) such as : You have received a new message. From:
[Steamfriend], You have received a new item in your inventory, etc. [maybe make it scroll (right to left) too if its too long?]

So these are what i want for now.... I would really appreciate the help..........

Welp i'm a disappointment in life.... i'm pretty sure these are really easy but i cant do them because my brain cells are
probably suiciding one by one.... :bow:
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: (Need Help)Show a text and image on windows startup and auto hide it.

Post by jsmorley »

As to the zooming icons on a launcher, the only way to get that will be with the ActionTimer plugin:

https://docs.rainmeter.net/manual-beta/plugins/actiontimer/

Take a look at the examples in the .rmskin you can download at the end of that. I think I have a zoom example or two in there.

In general, this list is just a Manhattan Project of work. I'm afraid that I don't have the cycles to wade into something where the question is so open-ended and just a request based on some desired end-result. If you have specific questions about a specific skin you are working on that you are having trouble with, someone will be glad to help out.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: (Need Help)Show a text and image on windows startup and auto hide it.

Post by jsmorley »

As to "delaying" the loading of skins, you can't really do that. You can get some 3rd-party utility that could delay the start of Rainmeter itself:

http://www.thewindowsclub.com/set-delay-time-startup-programs-windows

But it would be complicated to impossible to have Rainmeter start and delay the loading of one or more skins. It's not that it couldn't be done with some "parent" skin that loads and then after some time loads others and hides itself, but it would be rickety, and prone to issues if Rainmeter or your system crashes. It has a very Rube Goldberg feel to it.

However, the "inverse" of what we talked about before, where a skin is "visible" until some amount of time has passed, is possible. Just have the skins in question be "invisible" until some time has passed.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
SecondsToWait=10

[MeasureBeenLoadedFor]
Measure=Calc
Formula=Counter
IfCondition=MeasureBeenLoadedFor=1
IfTrueAction=[!Move "((#SCREENAREAWIDTH#/2)-150)" "((#SCREENAREAHEIGHT#/2)-50)"][!ZPos "2"][!HideFade]
IfCondition2=MeasureBeenLoadedFor>=#SecondsToWait#
IfTrueAction2=[!ShowFade][!PauseMeasure MeasureBeenLoadedFor]

[MeterBack]
Meter=Shape
Shape=Rectangle 0.75,0.75,300,100,12 | StrokeWidth 1.5 | Stroke Color 255,255,255,255 | Fill Color 47,47,47,255
UpdateDivider=-1

[MeterWelcome]
Meter=String
X=150
Y=50
StringAlign=CenterCenter
FontSize=16
FontWeight=700
FontColor=255,255,255,255
AntiAlias=1
UpdateDivider=-1
Text=Ok, it's been#CRLF##SecondsToWait# Seconds
1.png
You do not have the required permissions to view the files attached to this post.
Oyojo
Posts: 10
Joined: July 24th, 2017, 11:01 am

Re: (Need Help)Show a text and image on windows startup and auto hide it.

Post by Oyojo »

Well those will help (if not for all the things)
Atleast i can still make the game icons appear and zoom (maybe).
Thanks for the help...and fast replies anyway..

I know you guys couldn't help much but atleast you tried..i appreciate that.. :thumbup: :great:
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: (Need Help)Show a text and image on windows startup and auto hide it.

Post by balala »

Oyojo wrote:2) This effect? --> https://gfycat.com/HighlevelLeftEstuarinecrocodile
I'm also making a game launcher.. so can i make it zoom twice like that? [First the launcher (after the delay) starts zoomed
out, then it zooms in all the icons, then it zooms in, a second time but only for the icon that is selected (the whats new icon)]
For sure jsmorley's suggestion to use the ActionTimer plugin is the best one, but for a first approach, you could try a, let's say, "brute force":

Code: Select all

[Rainmeter]
Update=1000

[Variables]
ZoomPeriod=2

[MeasureTimer]
Measure=Calc
Formula=( MeasureTimer + 1 )
IfCondition=(#CURRENTSECTION#=#ZoomPeriod#)
IfTrueAction=[!DisableMeasure "#CURRENTSECTION#"][!SetOptionGroup Icons W "100"][!SetOptionGroup Icons H "100"][!UpdateMeterGroup "Icons"][!Redraw]

[MeterIcon1]
Meter=Image
ImageName=#@#Icon1.png
X=25
Y=25
W=80
H=80
PreserveAspectRatio=1
MouseOverAction=[!SetOption #CURRENTSECTION# X "0"][!SetOption #CURRENTSECTION# Y "0"][!SetOption #CURRENTSECTION# W "150"][!SetOption #CURRENTSECTION# H "150"][!SetOption MeterIcon2 Y "25r"][!UpdateMeter "#CURRENTSECTION#"][!UpdateMeter "MeterIcon2"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# X "25"][!SetOption #CURRENTSECTION# Y "25"][!SetOption #CURRENTSECTION# W "100"][!SetOption #CURRENTSECTION# H "100"][!SetOption MeterIcon2 Y "0r"][!UpdateMeter "#CURRENTSECTION#"][!UpdateMeter "MeterIcon2"][!Redraw]
Group=Icons

[MeterIcon2]
Meter=Image
ImageName=#@#Icon2.png
X=0R
Y=0r
W=80
H=80
PreserveAspectRatio=1
MouseOverAction=[!SetOption MeterIcon1 X "0"][!SetOption #CURRENTSECTION# Y "0"][!SetOption #CURRENTSECTION# W "150"][!SetOption #CURRENTSECTION# H "150"][!SetOption MeterIcon3 Y "25r"][!UpdateMeter "MeterIcon1"][!UpdateMeter "#CURRENTSECTION#"][!UpdateMeter "MeterIcon3"][!Redraw]
MouseLeaveAction=[!SetOption MeterIcon1 X "25"][!SetOption #CURRENTSECTION# Y "25"][!SetOption #CURRENTSECTION# W "100"][!SetOption #CURRENTSECTION# H "100"][!SetOption MeterIcon3 Y "0r"][!UpdateMeter "MeterIcon1"][!UpdateMeter "#CURRENTSECTION#"][!UpdateMeter "MeterIcon3"][!Redraw]
Group=Icons

[MeterIcon3]
Meter=Image
ImageName=#@#Icon3.png
X=0R
Y=0r
W=80
H=80
PreserveAspectRatio=1
MouseOverAction=[!SetOption MeterIcon1 X "0"][!SetOption #CURRENTSECTION# Y "0"][!SetOption #CURRENTSECTION# W "150"][!SetOption #CURRENTSECTION# H "150"][!UpdateMeter "MeterIcon1"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption MeterIcon1 X "25"][!SetOption #CURRENTSECTION# Y "25"][!SetOption #CURRENTSECTION# W "100"][!SetOption #CURRENTSECTION# H "100"][!UpdateMeter "MeterIcon1"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
Group=Icons
This code works with three icons, but you can easily add further, if you wish. Take care to replace the ImageName options of the [MeterIcon1] - [MeterIcon3] meters with the appropriate names.
Again, it's very sure this is not a very good looking approach, but I think it worth a try to see the result. If it look similarly with what you wanted, we can start to improve it, making much better looking. Please let me know what you think.
Oyojo
Posts: 10
Joined: July 24th, 2017, 11:01 am

Re: (Need Help)Show a text and image on windows startup and auto hide it.

Post by Oyojo »

Hmmmm.... I've tried the code by balala .. and it works quite well
but the thing is that...it's a bit instant...it would be better if it would be a bit slower so it would
give the feeling like of an animation... maybe there's a way to make it slower but i don't know?

You can try to improve that or add that as a feature in the next update? that will be great.. :thumbup:

BTW i have a suggestion...this is probably not the best place for it but i gtg to sleep and thought instead of making a thread i would simply reply here..

Code: Select all

[Startup]
Meter=StartupAction(eh.. bad name?)
StartupAction1={[! any bang] example:}[!ToggleConfig......] [!SetOption....]
Waittime=1000 (in milliseconds)(Optional, if needed to wait before next bang)
StartupAction2=[!SetOption Image1 W=100][!SetOptions Image1 H=100] [Update.......][!Red...]
Waittime=1000
StartupAction3=[!.......

[Image1]
Meter=Image
ImageName=#@#Image.jpg
Preserveaspectratio=2
X=0
Y=0
W=50
H=50
Hidden=0
Maybe make the code something like that?
(The code dosen't work i just made it L :lol: L )

Now it looks pretty similar to ActionTimer but i think this added as feature in the next update would make it easier for beginners (like me) in rainmeter to make skins and add bangs in startup or actions on startup of a skin, if ActionTimer looks a bit complicated to them..(like to me)

I'm not saying to replace these but maybe add this :)

Well its obviously what you guys think is the best.. cause you're the developers and moderators, i'm not forcing anyone to do anything :)

But if you're adding these features good luck... :) :thumbup:

And again thanks for the help... :D