Results 1 to 7 of 7

Thread: [RESOLVED] Get numbers of player.....

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    216

    Resolved [RESOLVED] Get numbers of player.....

    ok here is my problem there is a webpage (gaming site) and i want to get how many players are playing the game right now it says right on the page but i cant seems to find a code that specificly finds the numbers of players ok if u go to

    you will see on there main page it says all the game names and under them tells how many players playing that game so i have tired the split command in vb that doesnt work.....tried the search thing that doesnt work... any 1 here help me with code? plz... all i want is to get number of players of a game and show that in msgbox.... see picture below if u didnt under stand what i am saying



    thx in advance

  2. #2
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: Get numbers of player.....

    Read the source code for that then split it by using <strong> as your delimiter. If the count is constant you could easily get the value.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    216

    Re: Get numbers of player.....

    there more then 1 strong.... it gives me error when i try to do that

  4. #4
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: Get numbers of player.....

    I know. So you'll have to make a condition to that. I counted it and there's only 5 of them and the one you're looking for is second to the last.

    so you will less 1 from the upper bound of the array or simply put assuming its a constant value.

    yourArray(3) << there is your value

    You need to include Instr() and some Mid$() to trim the strings.

  5. #5
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: Get numbers of player.....

    This is a quick example.

    Code:
    Private Sub Command1_Click()
    Dim ff As Integer
    Dim myArr() As String
    
    ff = FreeFile
    Open "c:\www.ijji[1].txt" For Input As ff
    myArr = Split(Input(LOF(ff), ff), "<strong>")
    
    MsgBox Mid$(myArr(4), 1, 2) ' assuming the number of players are 2 digits only.
    
    Close ff
    
    End Sub
    I've attached the sample source from the website. I am in a rush buddy. You'll figure it out by yourself.
    Attached Files Attached Files

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    216

    Re: Get numbers of player.....

    wow >__< soo confused lol can u narrow it down for me? or provide some code?

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    216

    Re: Get numbers of player.....

    thx alot man help me alot!

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