Results 1 to 8 of 8

Thread: [RESOLVED] replacing static url variables 'within a sub' with Textbox input

Threaded View

  1. #1

    Thread Starter
    Addicted Member jalexander's Avatar
    Join Date
    Jan 2011
    Location
    Memphis, TN
    Posts
    160

    Red face [RESOLVED] replacing static url variables 'within a sub' with Textbox input

    Alright in my last post, dunfiddlin helped me figure out how to pause this Sub (which is ran in/by a background worker)
    In this post I'm trying to figure out how to replace URL variables..with 'textboxs' i can edit via my form.
    Alright so here is my code...and I want to replace some of the url variables with TextBox's incase I want to collect names just in a certain contest thread. I did figure out how to place a Textbox for the # of seconds pausing though LoL :goose:

    Code:
        Private Sub ParseUsers()
            Dim pageSrc As String = GetStuff("http://www.my-forum.com/my-search/index.htm?get_forum_id_sub=11&thread_id=22&b=1")
            Dim maxPages As Integer = GetMaxPages(pageSrc)
            ProgressBar1.Maximum = maxPages
            Profilelist.AddRange(ExtractUsers(pageSrc))
            For i As Integer = 2 To maxPages
                pageSrc = GetStuff("http://www.my-forum.com/my-search/index.htm?get_forum_id_sub=11&thread_id=22&b=" & i.ToString)
                Profilelist.AddRange(ExtractUsers(pageSrc))
                ProgressBar1.Value = i
                Dim t As UInt64 = Now.Ticks
                Do Until Now.Ticks - t >= TextBox3.Text * 10 ^ 7 'where TextBox3.Text is required delay in seconds
                Loop
            Next
            IO.File.WriteAllLines("USERS.txt", Profilelist.ToArray)
        End Sub
    I don't know how to do this spacing/context wise...but here's what I'm wanting to replace

    Code:
    ?get_forum_id_sub=11&  (replace just the #11 with TextBox1.Text)
    &thread_id=22&  (replace just the #22 with TextBox2.Text)
    Last edited by jalexander; Sep 2nd, 2012 at 12:09 AM. Reason: resolved
    dim jenn as geek = true
    Learning ~ Visual Basic 2010 ~ in free time between college/work -
    currently looking for a 'programming buddy' / 'coder friend' / and or 'mentor'. p.m. me if you
    have ANY free time AT ALL I'm like 33% of a novice level ~ willing 2 listen/learn +
    i am totally super motivated & promise to make an effffin amazing protege!!! #swag

    | -_-_- -_-_- |
    ...W.T..F!?.....
    ||| Matter on the atomic/quantum level isn't solid or even matter at all. It can also exist in at least 2 places simultaneously (demonstrated in lab). It's position can only be established when it's actually observed. If we turn our back on it... it goes back to a wave form. History show's that every previous generation (since the beginning of time) got almost everything wrong. Then it might very well stand to reason that up is down & right can be wrong. Admit it.. our combined perception of reality is just that, we know absolutely nothing of actual reality & to think we do is simply subscribing to a "ignorance is bliss" mantra |||

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width