Code:
Dim newstr() As String = {"1", "2", "3", "4", "5", "6"}
Dim oldstr() As String = {"a", "b", "c", "d", "e", "f"}
Dim notreplaced As String
Dim x As Integer = Nothing
Dim i As Integer = 0
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
notreplaced = TextBox1.Text
For num As Integer = 0 To oldstr.Length - 1
text = notreplaced.Replace(oldstr(num), newstr(num))
Next
SendKeys.Send(text)
SendKeys.Send("{enter}")
End Sub
I write into textbox -> a b c d e f and it sends a b c d e 6
What did I wrong, why is it replacing only the 6th element and how to make it send 123456 replacing oldstr(0) with newstr(0), oldstr(1) with newstr(1) and so on...
thx