Cheating Network
 
 

Go Back   Cheating Network > Programming > General
Reload this Page C# Help



General

This is a discussion about C# Help within the General section, where you will General Talk of Programming



Reply
 
LinkBack Thread Tools Display Modes
Old 10-04-2008, 10:38 PM   #1 (permalink)
Kyahahaha! The world is mine!
 
Dr. Wily's Avatar
 
Join Date: Dec 2007
Posts: 5,438
Reputation: 489
Dr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of light

cBay Rating:

S7 Scrivener Epsilon 

Send a message via AIM to Dr. Wily Send a message via MSN to Dr. Wily
Default C# Help

I am working on a bot and on the site there are two forum fields by the same name in two different cases. I want to only fill one field but for some reason it will always fill the other field. How can I change that.
Code I am trying to use:
Code:
this.webBrowser1.Document.GetElementById("username").SetAttribute("value", this.txtUser.Text)
__________________

If you feel generous: Donate!
Dr. Wily is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 10-04-2008, 10:50 PM   #2 (permalink)
Noob Helper
 
Join Date: Dec 2007
Posts: 459
Reputation: 167
grapplinghook has a spectacular aura aboutgrapplinghook has a spectacular aura about

cBay Rating:
Send a message via AIM to grapplinghook Send a message via MSN to grapplinghook Send a message via Yahoo to grapplinghook
Default

What is the webpage? If the ids are different, you can use the ids, otherwise you will have to loop through the elements until you get to the right one.
__________________
For all of my bots, click here

Quote:
Originally Posted by bigpapidh View Post
lmao, I gave my Mom's CC # to a dancing moose once, she wasnt happy.
Quote:
Originally Posted by bigpapidh View Post
there was this dancing moose pop up that asked for a CC #, I did what anyone would do and found someone elses CC and gave it to him, man it was a dancing moose couldnt resist.
grapplinghook is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2008, 10:53 PM   #3 (permalink)
Kyahahaha! The world is mine!
 
Dr. Wily's Avatar
 
Join Date: Dec 2007
Posts: 5,438
Reputation: 489
Dr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of light

cBay Rating:

S7 Scrivener Epsilon 

Send a message via AIM to Dr. Wily Send a message via MSN to Dr. Wily
Default

ID's are the same. Rather not say the webpage. Can you show some example of how to
Quote:
you will have to loop through the elements until you get to the right one.
__________________

If you feel generous: Donate!
Dr. Wily is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2008, 10:58 PM   #4 (permalink)
Noob Helper
 
Join Date: Dec 2007
Posts: 459
Reputation: 167
grapplinghook has a spectacular aura aboutgrapplinghook has a spectacular aura about

cBay Rating:
Send a message via AIM to grapplinghook Send a message via MSN to grapplinghook Send a message via Yahoo to grapplinghook
Default

What is different about them? Is there some attribute that is different between the two? An example of looping through:
Code:
string password = "password";
HtmlElementCollection collection = webBrowser1.Document.GetElementsByTagName("input");
foreach (HtmlElement el in collection)
{
    if (el.GetAttribute("value") == "Username")
    {
        el.SetAttribute("value", this.txtUser.Text);
    }
}
__________________
For all of my bots, click here

Quote:
Originally Posted by bigpapidh View Post
lmao, I gave my Mom's CC # to a dancing moose once, she wasnt happy.
Quote:
Originally Posted by bigpapidh View Post
there was this dancing moose pop up that asked for a CC #, I did what anyone would do and found someone elses CC and gave it to him, man it was a dancing moose couldnt resist.
grapplinghook is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2008, 11:00 PM   #5 (permalink)
Kyahahaha! The world is mine!
 
Dr. Wily's Avatar
 
Join Date: Dec 2007
Posts: 5,438
Reputation: 489
Dr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of lightDr. Wily is a glorious beacon of light

cBay Rating:

S7 Scrivener Epsilon 

Send a message via AIM to Dr. Wily Send a message via MSN to Dr. Wily
Default

Their two different boxes. One I can use to bypass captcha the other I can't for some odd reason. That idea worked for it, thanks a lot.
__________________

If you feel generous: Donate!
Dr. Wily is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2008, 11:03 PM   #6 (permalink)
Noob Helper
 
Join Date: Dec 2007
Posts: 459
Reputation: 167
grapplinghook has a spectacular aura aboutgrapplinghook has a spectacular aura about

cBay Rating:
Send a message via AIM to grapplinghook Send a message via MSN to grapplinghook Send a message via Yahoo to grapplinghook
Default

Give me the html of the two elements.
__________________
For all of my bots, click here

Quote:
Originally Posted by bigpapidh View Post
lmao, I gave my Mom's CC # to a dancing moose once, she wasnt happy.
Quote:
Originally Posted by bigpapidh View Post
there was this dancing moose pop up that asked for a CC #, I did what anyone would do and found someone elses CC and gave it to him, man it was a dancing moose couldnt resist.
grapplinghook is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2008, 11:19 PM   #7 (permalink)
Senior Member
 
Anigma's Avatar
 
Join Date: Jan 2008
Posts: 222
Reputation: 61
Anigma will become famous soon enough

cBay Rating:
Send a message via AIM to Anigma
Default

GetElementById should only return the first element that it finds, so it should work fine.
__________________


http://bux.to/?r=anigma || http://apple.v-bux.com/index.php?id=8356 << ONLY 4 REF FOR AN IPHONE!
Anigma is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-04-2008, 11:54 PM   #8 (permalink)
Junior Member
 
Join Date: Feb 2008
Posts: 12
Reputation: 0
LuckyLouie is an unknown quantity at this point

cBay Rating:
Default

You should show us the HTML so we can exam it better, but you could try this:

Code:
webBrowser1.Document.Forms[2].GetElementsByTagName("input").GetElementsByName("username")[1].InnerText = "value";
If it enters in the wrong box, change the [1] to [2]
LuckyLouie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-05-2008, 02:57 AM   #9 (permalink)
360 Modder
 
Join Date: Jun 2008
Posts: 942
Reputation: 266
phonzie is a jewel in the roughphonzie is a jewel in the roughphonzie is a jewel in the rough

cBay Rating:
Send a message via AIM to phonzie
Default

I actually wanted to know this, cuz i also had problems with this in other bots. multiple elements with same name and diff values, just no way to access them individually to click instead of just the first one.
__________________
phonzie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-24-2008, 09:21 PM   #10 (permalink)
Member
 
Join Date: Dec 2008
Posts: 35
Reputation: 6
zymurgy is an unknown quantity at this point

cBay Rating:
Default

You can use any property of forms. If the ID of two boxes are the same, use anything else like the tagname.
zymurgy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-24-2008, 09:26 PM   #11 (permalink)
Senior Member
 
Join Date: Feb 2008
Posts: 1,205
Reputation: 113
Karneey will become famous soon enoughKarneey will become famous soon enough

cBay Rating:

Scribe 

Default

Quote:
Originally Posted by zymurgy View Post
You can use any property of forms. If the ID of two boxes are the same, use anything else like the tagname.
I'm sure people learn a lot in 2 months, he should know how to by now.
__________________


Karneey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
c#


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin
Copyright © 2000-2008 Jelsoft Enterprises Limited.
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.