1

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
Egor Skriptunoff
  • 23,359
  • 2
  • 34
  • 64
  • What stops you from doing so? E.g. with `string:sub()`? Maybe I missed it but what language are we even talking about? – Luke100000 Apr 22 '22 at 15:55

1 Answers1

2

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
koyaanisqatsi
  • 2,585
  • 2
  • 8
  • 15