1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HELP! Made some thing MAGICAL but need some help with VB

Discussion in 'General Scripting Chat' started by Just A Tyler Durden, Aug 21, 2014.

  1. Just A Tyler Durden

    Just A Tyler Durden Regular Member

    Joined:
    Jul 1, 2014
    Messages:
    207
    Likes Received:
    89
    so I suck at coding, but I successfully made a YT comment bot but Im having some problems. I'm trying to get it to import a text file of urls, but I need it to import 1 url each time the button is pressed. I just about tried it all but still cant get it to work. Heres what I got so far for it. If any one knows how to do it PLZ help, add e on skype if you want.

    Code:
     Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click        
    Dim reader As New System.IO.StreamReader("C:\tally\urls.txt")
            Dim str1 As String
            str1 = reader.ReadLine()
            reader.close()
            TextBox1.Text = str1
        End Sub
     
  2. TrafficWizard

    TrafficWizard Junior Member

    Joined:
    Aug 22, 2014
    Messages:
    160
    Likes Received:
    26
    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button.Click
    Dim
    letsRead As System.IO.StreamReader
    letsRead =
    My.Computer.FileSystem.OpenTextFileReader("C:\tally\urls.txt")
    Dim readString As String
    readString = letsRead.ReadLine()
    MsgBox(readString)....


    Finish ending !
    Works ?