Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Help] Pressing button programatically

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Odecey
Master Cheater
Reputation: 1

Joined: 19 Apr 2007
Posts: 259
Location: Scandinavia

PostPosted: Sat Aug 30, 2008 7:28 pm    Post subject: [Help] Pressing button programatically Reply with quote

I'm in the need of knowing how to press a button on a webpage(which i have opened in a webbroser control) using code. Any help is appreciated.
Im coding in C# btw.

_________________
Never confuse activity with productivity. You can be busy without a purpose, but what's the point?- Rick Warren
Back to top
View user's profile Send private message MSN Messenger
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sat Aug 30, 2008 7:31 pm    Post subject: Reply with quote

Open the link the button opens when u press it?
Tab all the way to it?
Set the mouse pos to it and click?

_________________
Back to top
View user's profile Send private message
Frostbyt3
Master Cheater
Reputation: 0

Joined: 07 Jan 2008
Posts: 323
Location: Australia

PostPosted: Sat Aug 30, 2008 8:03 pm    Post subject: Reply with quote

If you can keep pressing tab till you get to the button, try this when the document has finished loading

Code:

SendKeys.Send("{TAB}"); //Repeat as many times as needed

SendKeys.Send("{ENTER}"); //Presses enter on the button

Back to top
View user's profile Send private message MSN Messenger
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sat Aug 30, 2008 8:14 pm    Post subject: Reply with quote

Frostbyt3 wrote:
If you can keep pressing tab till you get to the button, try this when the document has finished loading

Code:

SendKeys.Send("{TAB}"); //Repeat as many times as needed

SendKeys.Send("{ENTER}"); //Presses enter on the button



SendKeys.SendWait() is preferred over SendKeys.Send() because the latter doesn't allow the control/window to process the key before going on; sometimes certain keys simply don't register when you use it because it's overloaded with keys.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Odecey
Master Cheater
Reputation: 1

Joined: 19 Apr 2007
Posts: 259
Location: Scandinavia

PostPosted: Sun Aug 31, 2008 3:22 am    Post subject: Reply with quote

lurc wrote:
Open the link the button opens when u press it?
Tab all the way to it?
Set the mouse pos to it and click?

I think the first suggestion would be prefferable in my case( the last would be near impossible). It'll be in the HTML source code of the site right?
Thanks alot for the replies.
Edit It seems that the button calls a function when pressed
Code:
onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("Login$loginbtn", "", true, "", "", false, false))

The problem is, I can't find it in the source code. Is it possible to use my program to call this function?

_________________
Never confuse activity with productivity. You can be busy without a purpose, but what's the point?- Rick Warren
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites