[Solved]How to use substr in macros.txt?
Posted: 25 May 2019, 09:02
hello,
I need get third number from a lot of number
There are 10 random numbers,Every time is different
^5613265165
^2153261952
I found information about perl Function substr can help me get number
but how to use substr in macros.txt?
I tried like this:
automacro pp {
exclusive 1
run-once 1
map geffen
console /: \^(.*)/
call {
log $.lastMatch1
$aa = $.lastMatch1
$bb = @eval(substr($aa),3,1)
release all
stop
}
}
but not work,please help me,thanks before
I need get third number from a lot of number
There are 10 random numbers,Every time is different
^5613265165
^2153261952
I found information about perl Function substr can help me get number
but how to use substr in macros.txt?
I tried like this:
automacro pp {
exclusive 1
run-once 1
map geffen
console /: \^(.*)/
call {
log $.lastMatch1
$aa = $.lastMatch1
$bb = @eval(substr($aa),3,1)
release all
stop
}
}
but not work,please help me,thanks before