Results 1 to 20 of 20

Thread: Help With Coding Myspace

  1. #1

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Help With Coding Myspace

    what do i have wrong here?

    Code:
    Dim i As Integer
    For i = 0 To List.ListCount - 1
    BrowSerA.Navigate2 "http://friends.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendId=" & List.List(i)
    Do Until BrowSerA.ReadyState = 4
    DoEvents
    Loop
    BrowSerA.Document.All("ctl00_ctl00_ctl00_cpMain_cpMain_cpfMainBody_AddFriendRequestButtons_btnAddToFriends").Click
    Do Until BrowSerA.ReadyState = 4
    DoEvents
    Loop
    Next
    Last edited by Charlie Stallings; Nov 11th, 2009 at 08:20 PM. Reason: wanted to edit title didnt fit message

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Help With Coding

    give us a clue
    what happens? error, nothing, unexpeced result?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding

    what i want it to do is goto the url click the button on the page then wait for the next page to load then start over

  4. #4

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding

    here is what i have so far

    i have included the source code to my project if you can get it working right then repost it also you wont need a username or password i have included a test account for this as well so if you can help then please do

    the way it works is you login using my test account then click browser then browse friends thats the best way then hit gather ids it'll gather the ids but when you click add friends thats where im having the problem if you can assit then please do
    Attached Files Attached Files

  5. #5

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding

    the way you get the ids is login using the provided myspace email and password (already in text boxes just click login) then goto friends and click browse friends then when you get to the browse friends page click get ids that works fine it loads to a listbox and all but i need help with the adding part ....

  6. #6

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding Myspace

    why does it freeze visual basic sometimes? take a look at the adding code and see whats wrong?

  7. #7

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding Myspace

    here is a error im getting after changing the code


    Run-time error'91':

    Object varible or With block variable not set


    i got it to get to the click but it errors out


    here is my updated code want to have a look at source let me know will upload updated source or just relace code in previous source PLEASE HELP!!!!!!!!!!

    Code:
    Dim i As Integer
    Dim HTMLData As String
    HTMLData = BrowSerA.Document.documentelement.innerhtml
    For i = 0 To List.ListCount - 1
    BrowSerA.Navigate2 "http://friends.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendId=" & List.List(i)
    Do Until Not BrowSerA.ReadyState = 4
    DoEvents
    Loop
    Form1.Text3.Text = BrowSerA.Document.documentelement.innerhtml
    BrowSerA.Document.All("ctl00_ctl00_ctl00_cpMain_cpMain_cpfMainBody_AddFriendRequestButtons_btnAddToFriends").Click
    Do Until BrowSerA.LocationURL = ("http://friends.myspace.com/index.cfm?fuseaction=invite.addfriend_confirm&statusCD=0&friendId=") & List.List(i)
    DoEvents
    Loop
    Next

  8. #8
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Help With Coding Myspace

    Try this:
    use set
    Code:
    set HTMLData = BrowSerA.Document.documentelement.innerhtml

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  9. #9

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding Myspace

    sorry i forgot to remove that line it didnt even have any meaning in that new code so that wouldnt correct anything

  10. #10

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Thumbs up Re: Help With Coding Myspace

    ok i got it clicking the link and going to the next page it looks like it adds the users and everything it looks like its working great but when you go to the sent request page the requests you send arnt there


    here is the source
    Attached Files Attached Files

  11. #11

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding Myspace

    anyone?

  12. #12
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Help With Coding Myspace

    when i tried your code, it shows some error message and asks for debugging....

    My system details:
    OS : Win XP Pro
    IE ver: 6

    May be it is due to this old IE or something, i don't know...

    I will try to check them... But I am not sure..
    Last edited by akhileshbc; Nov 12th, 2009 at 10:13 AM.

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  13. #13

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding Myspace

    i dunno man its nt erroring on my end but if you get it working correctly upload the project

  14. #14

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Thumbs up Re: Help With Coding Myspace

    heres the update i got it adding and everything but it errors out can someone help me fix the errors? thats all i need now i fixed the adding code
    Attached Files Attached Files

  15. #15

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding Myspace

    anyone?

  16. #16
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Help With Coding Myspace


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  17. #17

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding Myspace

    hmmmmmmmm i dont get that error

  18. #18

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding Myspace

    hmmmm im not sure why your getting that error ..... someone please assist me in this project the coded work but sometimes error out

  19. #19

    Thread Starter
    Lively Member Charlie Stallings's Avatar
    Join Date
    Nov 2009
    Location
    Virginia
    Posts
    118

    Re: Help With Coding Myspace

    anyone know?

  20. #20
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Help With Coding Myspace

    Unfortunately threads on this topic are not allowed on this site.

    That is because the MySpace Terms include this:
    The following are examples of the kind of activity that is illegal or prohibited ...
    8.24 any automated use of the system, such as, but not limited to, using scripts to add friends or send comments, messages, status or mood updates, blogs or bulletins;
    ..as such you are not allowed to write a program to interact with their site.

    Our rules (see the Acceptable Use Policy link at the bottom of all VBForums pages) explicitly state that you cannot use this site to get assistance with violating the rules of other sites - so I'm afraid this thread is now closed.

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