07-18-2012, 02:32 AM
I seemingly have figured out how to do the enter part etc.However what i would like it to do below is select all text in the location where pasted interval backspace then continue pasting words from the list. If anyone could help me it would highly appreciate it as i am kind of noob. Also much appreciated ace for the code above.
Quote:Public Class Form1
Dim streamer As IO.StreamReader
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OpenFileDialog1.ShowDialog()
TextBox1.Text = OpenFileDialog1.FileName
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
streamer = IO.File.OpenText(TextBox1.Text)
Dim mystring() As String = streamer.ReadToEnd.Split(vbNewLine)
ListBox1.Items.AddRange(mystring)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Threading.Thread.Sleep(2000)
For Each Obj As String In ListBox1.Items
SendKeys.Send(Obj & "~")
Threading.Thread.Sleep(5000)
SendKeys.Send("{ENTER}")
/////////Select all text needed here i assume.
SendKeys.Send("{BACKSPACE}")
Threading.Thread.Sleep(2000)
Next
End Sub
End Class
Eligible.