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
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
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
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 ....
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
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
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
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
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
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.