It is currently April 27th, 2024, 12:46 am

"Type out text"

Get help with creating, editing & fixing problems with skins
Deliveryboy90
Posts: 2
Joined: August 27th, 2020, 6:29 pm

"Type out text"

Post by Deliveryboy90 »

Hello all,

I am trying to get my time display to actively type out the text of the time, and then stop.

This actually occurs with my current media player.

As you can see in the images below:

Image
Image

Now it's a really cool effect, but I want to be able to do the same for my time text and make it seem like more of an active computer. Kind of what you would see in DOS in old movies.

Here is the code for my current media player. Credit for both goes to Connect-R; however I have been messing around with the timer script.

Code: Select all

[Rainmeter]
Update=300
Author=Connect-R
DynamicWindowSize=1
BackgroundMode=1
SolidColor=0,0,0,1

[Variables]
@include=#@#Variables.inc
@include2=#@#Language\#Language#.inc
CharacterIndex=0
TextToType=> [MeasureTitle]

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Artist
UpdateDivider=5

[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Title
UpdateDivider=5

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureStrLenInfo]
Measure=String
String=#TextToType#
RegExpSubstitute=1
Substitute=".":"1+","\+$":""
DynamicVariables=1

[MeasureStrLen]
Measure=Calc
Formula=[MeasureStrLenInfo]
DynamicVariables=1

[MeasureCharacterIndex]
Measure=Calc
Formula=#CharacterIndex#
IfConditionMode=1
IfCondition=#CURRENTSECTION#=[MeasureStrLen]
IfTrueAction=[!SetVariable "CharacterIndex" "1"]
IfFalseAction=[!SetVariable "CharacterIndex" "(#CharacterIndex# + 1)"]
DynamicVariables=1

[MeasureTextToType]
Measure=String
String=#TextToType#
RegExpSubstitute=1
Substitute="^(.{#CharacterIndex#,#CharacterIndex#}).*$":"\1"
DynamicVariables=1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Left
StringCase=Upper
FontFace=Montserrat SemiBold
FontColor=ffffff
FontSize=12
X=0
Y=0
Text="%1"
AntiAlias=1

[MeterTitle]
Meter=String
StringAlign=Left
StringCase=Upper
FontFace=Montserrat SemiBold
FontColor=ffffff
FontSize=12
X=125r
Y=0r
Text="[MeasureTextToType] "
PostFix=""
AntiAlias=1
DynamicVariables=1

Now i've also tried to emulate this in the timer, it is very messy, but for some reason it is only flashing between two text sources, it is not typing out the data the same way the media player does:

Code: Select all

[Rainmeter]
Update=1000
Author=Connect-R
DynamicWindowSize=1
BackgroundMode=1
SolidColor=0,0,0,1


[Variables]
@include=#@#Variables.inc
@include2=#@#Language\#Language#.inc
CharacterIndex=0
TextToType=> [MeasureTimeOfDay]

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureTimeOfDay]
Measure=Time
Format="%H"
Substitute=#TimeOfDay#

[MeasureReminder]
Measure=Time
Format="%H"
Substitute=#WishReminder#

[MeasureStrLenInfo]
Measure=String
String=#TextToType#
RegExpSubstitute=1
Substitute=".":"1+","\+$":""
DynamicVariables=1

[MeasureStrLen]
Measure=Calc
Formula=[MeasureStrLenInfo]
DynamicVariables=1

[MeasureCharacterIndex]
Measure=Calc
Formula=#CharacterIndex#
IfConditionMode=1
IfCondition=#CURRENTSECTION#=[MeasureStrLen]
IfTrueAction=[!SetVariable "CharacterIndex" "1"]
IfFalseAction=[!SetVariable "CharacterIndex" "(#CharacterIndex# + 1)"]
DynamicVariables=1

[MeasureTextToType]
Measure=String
String=#TextToType#
RegExpSubstitute=1
Substitute="^(.{#CharacterIndex#,#CharacterIndex#}).*[MeasureTimeOfDay]":"Welcome Captain, Initializing"
DynamicVariables=1
;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureUserName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=(USER_NAME)
UpdateDivider=-1
disabled=1
MeasureName2=MeasureUserName
;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterOutputStart]
Meter=String
MeasureName=MeasureTimeOfDay
MeasureName2=MeasureReminder
Measurename3=MeasureTextToType
StringAlign=left
FontColor=#TextColor#
FontFace=Montserrat Light
FontSize=18
W=1000
H=300
X=100
Y=10
Text="%3"
AntiAlias=1
ClipString=1
Postfix=" "

Currently it cycles like this:

Image

Image

Any help would be appreciated. Is this not a thing outside of the media player? I am not very experienced in this matter unfortunately, so any answer may require a bit further of explanation; i'm competent, but I am also still asking for help with something that appears fairly simple.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: "Type out text"

Post by Yincognito »

Deliveryboy90 wrote: August 27th, 2020, 6:37 pm Hello all,

I am trying to get my time display to actively type out the text of the time, and then stop.
There you go:

Code: Select all

[Variables]
TextToType=" [MeasureTimeOfDay]"

[Rainmeter]
Update=300
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=0,0,0,1

---Measures---

[MeasureTimeOfDay]
Measure=Time

[MeasureStrLenInfo]
Measure=String
String="#TextToType#"
RegExpSubstitute=1
Substitute=".":"+1"
DynamicVariables=1

[MeasureStrLen]
Measure=Calc
Formula=[MeasureStrLenInfo]
DynamicVariables=1

[MeasureCharacterIndex]
Measure=Calc
Formula=((MeasureCharacterIndex>=MeasureStrLen)?(MeasureCharacterIndex):(MeasureCharacterIndex+1))
DynamicVariables=1

[MeasureTextToType]
Measure=String
String="#TextToType#"
RegExpSubstitute=1
Substitute="^(.{[MeasureCharacterIndex]}).*$":"\1"
DynamicVariables=1

---Meters---

[MeterOutputStart]
Meter=String
MeasureName=MeasureTextToType
FontColor=255,255,255,255
FontFace=Montserrat Light
FontSize=18
AntiAlias=1
Text=">%1"
DynamicVariables=1
If you want to continuously type out the #TextToType# variable, simply change MeasureCharacterIndex (the occurence right after the question mark) with 1. As for the explanation of what happens, ask and I'll answer, but later on today. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Deliveryboy90
Posts: 2
Joined: August 27th, 2020, 6:29 pm

Re: "Type out text"

Post by Deliveryboy90 »

Thank you, very helpful!
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: "Type out text"

Post by Yincognito »

Deliveryboy90 wrote: August 28th, 2020, 10:34 pm Thank you, very helpful!
Glad to help.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth