Rainmeter Shenanigans, $UserInput$, Slicing

93 Views Asked by At

I just want to take my $UserInput$ and remove the first 2 chars from it.

Please help

Input = w015443746

Want = 15443746

[measureInput]
; The InputText.dll plugin has special powers: it allows user input.
; However, it's not the easiest way to start learning Rainmeter. Get a
; hold of the basics, and then check out the manual entry for InputText.
Measure=Plugin
Plugin=InputText.dll
SolidColor=20,20,20,255
StringAlign=Left
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
X=10
Y=38
W=188
H=17
FocusDismiss=1
DefaultValue=""
Command1=["https://www.google.com/search?q$UserInput$"]
UpdateDivider=86400
1

There are 1 best solutions below

0
On

Lua strings have all string functions attached as methods.
So it could be possible to do...

Input = 'w015443746'
Want = Input:sub(3)

( Thats what @Luke100000 mean )
Impression from Lua Standalone

Lua 5.4.4  Copyright (C) 1994-2022 Lua.org, PUC-Rio
> Input = 'w015443746'
> Want = Input:sub(3)
> print(Want)
15443746