Report Bugs Here

Moderator: Mmiscool

User avatar
By xtal
#33076 your code extract eer form eerfh20
I want to extract 20 to change refresh count, I thru the e's in to test instr, I keep getting 0 not 2/3

Why the end after the code ??

using rfh without quotes , how would you use a var then ??
User avatar
By Mmiscool
#33077 using the quotes is proper form. Right ow the interpreter assumes if variable name has not been used yet that it is a string.

The below code also works.

Code: Select allmycommand = "eerfh20"
x = instr(mycommand,"rfh")
z = x + 3
y = mid(mycommand,x,z)
SERIALPRINTLN mycommand
SERIALPRINTLN x
serialprintln y
end
User avatar
By Mmiscool
#33088 Uploaded a new build fixing problems in mid() left() and right() functions.

The below code seems to be working.

Code: Select allmycommand = "eerfh20"

[top]
cls
textbox mycommand
button "Submt" [myBranch]
wait

[myBranch]
x = instr(mycommand,"rfh")
x = x + len("rfh")
z = x + 2
y = mid(mycommand,x,z)
print y
wait