It is currently September 20th, 2019, 5:32 pm

How to show text on the Screen Display ?

Help with creating, editing & fixing problems with skins
User avatar
Naruto
Posts: 47
Joined: December 8th, 2012, 8:05 pm
Location: Egypt

How to show text on the Screen Display ?

Naruto » August 23rd, 2015, 1:09 pm

I want to show a text on the screen for 5 seconds and then disappear where the text is topmost of everything on the screen, so How to do it ?

- I think the only way is to make another skin and call the [!Toggle "My-Skin"] to make it appear and then wait 5 sec and the call it again to make it disappear, but this way have a lot of problems like how to make a connection between the two skins to exchange the text to be shown on the screen, and how to make the wait command that will make the skin disappear after 5 sec ?

-If there is anyway else but without installing any program it ok like using a command line to do it or something.
User avatar
balala
Rainmeter Sage
Posts: 8630
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to show text on the Screen Display ?

balala » August 23rd, 2015, 2:33 pm

Naruto wrote:I want to show a text on the screen for 5 seconds and then disappear where the text is topmost of everything on the screen, so How to do it ?
I'm not very sure I entirly understood what you'd like (I don't know what you mean by "where the text is topmost of everything on the screen"), but if I'm not wrong, maybe this could help:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,180

[Variables]
Interval=5

[Timer]
Measure=Calc
Formula=( Timer + 1 )
Disabled=1
IfCondition=(Timer>0)
IfTrueAction=[!ShowMeter "MeterToShow"]
IfCondition2=(Timer=#Interval#)
IfTrueAction2=[!DisableMeasure "Timer"][!HideMeter "MeterToShow"]

[MeterShow]
Meter=STRING
X=0
Y=0
FontSize=14
FontColor=255,255,255
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Show
LeftMouseUpAction=[!EnableMeasure "Timer"]

[MeterToShow]
Meter=STRING
X=0r
Y=5R
FontSize=14
FontColor=255,240,0
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=This will disapear in 5 secs
Hidden=1
The [Timer] measure is initialy disabled and the [MeterToShow] is hidden. Then, when you click to the [MeterShow], [Timer] is enabled, it'll start to count and, according to the IfTrueAction of the [Timer] measure, the second meter become visible. When [Timer] reaches 10 (in fact #Interval#), the measure is disabled once again and the [MeterToShow] is hidden, according to IfTrueAction2.
Naruto wrote:I think the only way is to make another skin and call the [!Toggle "My-Skin"] to make it appear and then wait 5 sec and the call it again to make it disappear, but this way have a lot of problems like how to make a connection between the two skins to exchange the text to be shown on the screen, and how to make the wait command that will make the skin disappear after 5 sec ?
As you see, there's no need of another skin for this, but it also can be done this way. The connection between the two skins can be done using the Config parameter of the most bangs. Eg to show a meter onto another skin, you can use this bang: !ShowMeter "MeterToShow" "SecondConfig". To can use it, you must have loaded both skins: that where you have this bang and also the SecondConfig.
User avatar
Naruto
Posts: 47
Joined: December 8th, 2012, 8:05 pm
Location: Egypt

Re: How to show text on the Screen Display ?

Naruto » August 23rd, 2015, 3:09 pm

Thanks for the code i think it's what i want.
And for
I want to show a text on the screen for 5 seconds and then disappear where the text is topmost of everything on the screen, so How to do it ?
i mean that a window was opened like Firefox or windows explorer the skin will show itself on the top of all these windows to show up right on the screen to notify me of something and then toggle back to the normal state to the desktop after the 5 sec.

I want also to ask what the BackgroundMode=2 is doing ?
User avatar
balala
Rainmeter Sage
Posts: 8630
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to show text on the Screen Display ?

balala » August 23rd, 2015, 4:07 pm

Naruto wrote:i mean that a window was opened like Firefox or windows explorer the skin will show itself on the top of all these windows to show up right on the screen to notify me of something and then toggle back to the normal state to the desktop after the 5 sec.
Ok, now I understood. For this, try to modify the IfTrueAction and IfTrueAction2 options of the [Timer] measure, adding the !ZPos bangs, which can be used to set the position of the skin (2 is for always on top and 0 for a normal position):

Code: Select all

[Timer]
Measure=Calc
Formula=( Timer + 1 )
Disabled=1
IfCondition=(Timer>0)
IfTrueAction=[!ShowMeter "MeterToShow"][!ZPos "2"]
IfCondition2=(Timer=#Interval#)
IfTrueAction2=[!DisableMeasure "Timer"][!HideMeter "MeterToShow"][!ZPos "0"]
Naruto wrote:I want also to ask what the BackgroundMode=2 is doing ?
I've used that option to set a solid color for the background of the skin. The color is set with the SolidColor=0,0,0,180 option of the same [Rainmeter] section. Details here.
User avatar
Naruto
Posts: 47
Joined: December 8th, 2012, 8:05 pm
Location: Egypt

Re: How to show text on the Screen Display ?

Naruto » August 23rd, 2015, 4:31 pm

Thanks a lot man, but i guess i will make the text meter in another skin as i want only the text to appear on the screen not all the skin and if anything goes wrong i will come and ask in the same topic here.
User avatar
balala
Rainmeter Sage
Posts: 8630
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to show text on the Screen Display ?

balala » August 23rd, 2015, 5:16 pm

Ok, just ask if you have any question.
User avatar
Naruto
Posts: 47
Joined: December 8th, 2012, 8:05 pm
Location: Egypt

Re: How to show text on the Screen Display ?

Naruto » August 23rd, 2015, 5:22 pm

Oh no, please post the same example you gave me

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,180

[Variables]
Interval=5

[Timer]
Measure=Calc
Formula=( Timer + 1 )
Disabled=1
IfCondition=(Timer>0)
IfTrueAction=[!ShowMeter "MeterToShow"]
IfCondition2=(Timer=#Interval#)
IfTrueAction2=[!DisableMeasure "Timer"][!HideMeter "MeterToShow"]

[MeterShow]
Meter=STRING
X=0
Y=0
FontSize=14
FontColor=255,255,255
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Show
LeftMouseUpAction=[!EnableMeasure "Timer"]

[MeterToShow]
Meter=STRING
X=0r
Y=5R
FontSize=14
FontColor=255,240,0
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=This will disapear in 5 secs
Hidden=1
but separate the [MeterToShow] to another skin cause i can't make it work.
And please show me in the example how to set the text of a meter from the other skin?
User avatar
balala
Rainmeter Sage
Posts: 8630
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to show text on the Screen Display ?

balala » August 23rd, 2015, 5:52 pm

Copy this code into any skin:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,180

[Variables]
Interval=5

[Timer]
Measure=Calc
Formula=( Timer + 1 )
Disabled=1
IfCondition=(Timer>0)
IfTrueAction=[!ShowMeter "MeterToShow" "Proba1\CPU"]
IfCondition2=(Timer=#Interval#)
IfTrueAction2=[!DisableMeasure "Timer"][!HideMeter "MeterToShow" "SkinToShowHide"]

[MeterShow]
Meter=STRING
X=0
Y=0
FontSize=14
FontColor=255,255,255
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Show
LeftMouseUpAction=[!EnableMeasure "Timer"]
Then create a SkinToShowHide config (folder) into the #SKINSPATH#. Create any ini file into this config and copy the following code into it:

Code: Select all

[Rainmeter]
Update=1000

[MeterToShow]
Meter=STRING
X=0
Y=0
FontSize=14
FontColor=255,240,0
SolidColor=0,0,0,120
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=This will disapear in 5 secs
Hidden=1
Refresh all, the load both skins. You'll see a "Show" string (from the first created skin), but you won't see anything from the second skin. When you click to the Show string, the "This will disapear in 5 secs" string (from the second skin) will appear and after 5 seconds (or whatever you set with the Interval variable) will disappear.
The key is the last parameter of the !ShowMeter and !HideMeter bangs in the IfTrueAction and IfTrueAction2 options of the [Timer] measure. This parameter ("SkinToShowHide") tells that the MeterToShow meter is not into the current skin, but into the skin which is loaded from the SkinToShowHide config (as just one skin can be loaded from a config, at a time).
Don't forget to set the second skin to stay topmost (or add an OnRefreshAction=[!ZPos "2"] option to the [Rainmeter] section into the same second skin).
User avatar
Naruto
Posts: 47
Joined: December 8th, 2012, 8:05 pm
Location: Egypt

Re: How to show text on the Screen Display ?

Naruto » August 23rd, 2015, 8:13 pm

That is great, but how to bass a text from the main skin to the SkinToShowHide as i want to change the text based on some measures from the main skin.
So how to do it?

Edit: It didn't work the other(SkinToShowHide) skin didn't show, so to get i strait
my main skin bath is:
C:\Users\Naruto\Documents\Rainmeter\Skins\My-skin\Time Progress\Day Progress 4\Day Progress Bar.ini
and the SkinToShowHide bath is: C:\Users\Naruto\Documents\Rainmeter\Skins\SkinToShowHide\Un-Hide Time.ini
So when i have to start the SkinToShowHide what i have to write:
-[!ShowMeter "MeterToShow" "SkinToShowHide"]
or
-[!ShowMeter "MeterToShow" "SkinToShowHide\Un-Hide Time"]
both didn't work for me so what is wrong ?
User avatar
balala
Rainmeter Sage
Posts: 8630
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to show text on the Screen Display ?

balala » August 23rd, 2015, 8:41 pm

Using the same technique: with a !SetOption bang (or with a !SetVariable, depending on your needs).
Example: add to the first skin this measure:

Code: Select all

[MeasureRandom]
Measure=Calc
Formula=Random
LowBound=1
HighBound=50
Then modify the LeftMouseUpAction of the [MeterShow] meter to this: LeftMouseUpAction=[!EnableMeasure "Timer"][!SetOption MeterToShow Text "Random number: [MeasureRandom]" "SkinToShowHide"]. After a refresh of both skins, at a click, on the second skin will appear the "Random number: x" string, instead of the original "This will disapear in 5 secs" (which is still there as the Text option of the [MeterToShow] meter, on the second skin).