Okay, so I just started learning VB6 and I just got through a login source, figuring out all the code along the way. If I were to make a, say, autobuyer, what step would I take next? Can someone with experience point me in the right direction? Thanks in advance. See the bottom of this thread for my current issue..
Re: Help request for a vb6 noob you cant expect to make an aber right after you started learning. i recommend learning how to use functions in the wrapper and other functions like findstring and instr to help make programs more dynamic
I would learn how to make a money tree grabber. I would recomend looking at some source to get the feel of the language
Maybe try making something really simple like a spider program since you just started. Making a ABer is way too hard for begineers
Alright, thanks for the help, guys. I already understand some commands, I think. Like InStr.. Anyway, I'll go look for some money tree grabber sources/spiderer sources if I can find any. While I'm here.. can anyone explain to me why this isn't working? Keep in mind that it's for Subeta, not Neopets. Code (Text): Private Sub cmdStart_Click() Dim strHTML As String lblStatus.Caption = "Starting up!" strHTML = wrapper.GetWrapper("http://www.subetax.org /explore/ocean_depths.php", "http://www.subetax.org/ explore/unknown.php") If InStr(1, strHTML, "welcome") Then lblStatus.Caption = "It's working, captain." ElseIf InStr(1, strHTML, "Ocean Depths Vending Machine") Then lblStatus.Caption = "Not quite there, captain." Else lblStatus.Caption = "Unknown :(" End If End Sub
first remove spaces, secondsly teh instr is case sensitive. if you need help fell free to pm/msn me. Also remebr if you have to be logged int to veiw the page you will not be logged in sicne you;ll nned to manually login with the httpwrapper
I've added you on msn. . Thanks for the help so far EDIT: In case I don't get in contact with you soon enough: The problem still occurs.. I changed the InStr to "Welcome" to be more accurate, but it still return and unknown error. For the login part.. are you saying I have to include a login to my program for it to work? Or can I just manually log in on firefox and start the program? EDIT again: Another thing.. can anyone here successfully make a login for Subetax.org? If they could and show me the source, I'd greatly appreciate it, for I have failed every attempt
well I'm really supoosed to be asleep right now so I cannot be on right now. And yes you will need a working sebetax.org login for this program to work unless you grab the bookie from firefox which is next to impossible for a begiiner.
Well, along with this not working: Code (Text): Private Sub cmdStart_Click() Dim strHTML As String lblStatus.Caption = "Starting up!" strHTML = wrapper.GetWrapper("http://www.subetax.org/explore/ocean_depths.php", "http://www.subetax.org/ explore/unknown.php") If InStr(1, strHTML, "welcome") Then lblStatus.Caption = "It's working, captain." ElseIf InStr(1, strHTML, "Ocean Depths Vending Machine") Then lblStatus.Caption = "Not quite there, captain." Else lblStatus.Caption = "Unknown :(" End If End Sub I tried to make a login, but it's not working either. Here's the code: Code (Text): Private Sub cmdLogin_Click() Dim strHTML As String strHTML = wrapper.GetWrapper("http://www.subetax.org/") lblStatus.Caption = "Logging in 1 . . ." strHTML = wrapper.GetWrapper("http://www.subetax.org/login.php", "http://www.subetax.org/") lblStatus.Caption = "Logging in 2 . . ." strHTML = wrapper.Postwrapper("http://www.subetax.org/login.php", "Name=" & txtUser.Text & "&Password=" & txtPass.Text & "&act=login&actcode=&Login=Login") lblStatus.Caption = "Logging in 3 . . ." If InStr(1, strHTML, "Incorrect") Then lblStatus.Caption = "Bad password. Try again." ElseIf InStr(1, strHTML, "http://www.subetax.org/news.php") Then lblStatus.Caption = "You have logged in." Else lblStatus.Caption = "Error. :(" End If End Sub The login tells me if the pass is bad, which is good. But it won't recognize it when I put in a GOOD user/pass. If I do, it gives me an error.
add a breakpoint on this line ElseIf InStr(1, strHTML, "http://www.subetax.org/news.php") Then and hover your mouse over strHTML and see what code that string contains, paste it here. also when you say an error do you mean a proper error or the 'Error ' message in the label?
What's a breakpoint? and I hovered but I don't get anything.. only the mouse is there . and the error is my error, not the proper error. Also, Code (Text): ElseIf InStr(1, strHTML, "http://www.subetax.org/news.php") The url in that code doesn't have to be there.. I could just change it to something else contained on the page after you login (right?)
a break is where you click on the left margin on the line you want it to stop at and a red circle will appear and when your running the program the code window will come up and you can check the values of your variables.
Okay, I clicked the side and the red circle appeared.. I ran the program.. then it stopped and there's a yellow circle and yellow background on that line now. What do I do next? Wait, I hovered over strHTML and got this: Code (Text): strHTML = "HTTP/1.1 302 FoundDate: Fri, 13 Jul 2007 16:07:39 GMTServer: ... That's all it says..
you need the whole strhtml, so after the instr, put msgbox(strhtml) and that should be enough to see at least to the part your looking for.
there should be a button to expand it and view all the html code? I think that's only the start of it...
Code (Text): Private Sub cmdLogin_Click() Dim strHTML As String strHTML = wrapper.GetWrapper("http://www.subetax.org/") lblStatus.Caption = "Logging in 1 . . ." strHTML = wrapper.GetWrapper("http://www.subetax.org/login.php", "http://www.subetax.org/") lblStatus.Caption = "Logging in 2 . . ." strHTML = wrapper.Postwrapper("http://www.subetax.org/login.php", "Name=" & txtUser.Text & "&Password=" & txtPass.Text & "&act=login&actcode=&Login=Login") MsgBox(strHTML) lblStatus.Caption = "Logging in 3 . . ." If InStr(1, strHTML, "Incorrect") Then lblStatus.Caption = "Bad password. Try again." ElseIf InStr(1, strHTML, "http://www.subetax.org/news.php") Then lblStatus.Caption = "You have logged in." Else lblStatus.Caption = "Error. :(" End If End Sub Like that? EDIT: So by the looks of it, it works? News.php is where it goes when you log in..