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 


slovach, i need more help (everyone feel free to help)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
TheIndianGuy
Advanced Cheater
Reputation: 102

Joined: 14 Jan 2007
Posts: 88

PostPosted: Tue Aug 28, 2007 2:54 pm    Post subject: slovach, i need more help (everyone feel free to help) Reply with quote

i tested my auto typer and what happens is it sends the text from the textbox fine but i also wanted it to hit enter but instead it hits enter and sends the text enter here is my code how should i fix it so it stops sending the text enter and only "hits" the button enter

Code:
        private void timer1_Tick(object sender, EventArgs e)
        {
            SendKeys.Send(textBox2.Text);
            SendKeys.Send("(Enter)");
        }
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Tue Aug 28, 2007 3:59 pm    Post subject: Reply with quote

well in C++ this works

so, it will probs work in C#

instead of using SendKeys.send("(ENTER)")

use \r\n

Example code:

Code:
textbox1.text = textbox1.text+"\r\n"


which is a carriage return then a new line.

also, i think in C++ its ("{ENTER}"), not sure if its diff from C#

i dont know C# but its very similar to C++, just using .'s instead of ->'s or ::'s

_________________
Back to top
View user's profile Send private message
TheIndianGuy
Advanced Cheater
Reputation: 102

Joined: 14 Jan 2007
Posts: 88

PostPosted: Tue Aug 28, 2007 4:02 pm    Post subject: Reply with quote

lurc wrote:
well in C++ this works

so, it will probs work in C#

instead of using SendKeys.send("(ENTER)")

use \r\n

Example code:

Code:
textbox1.text = textbox1.text+"\r\n"


which is a carriage return then a new line.

also, i think in C++ its ("{ENTER}"), not sure if its diff from C#

i dont know C# but its very similar to C++, just using .'s instead of ->'s or ::'s


yeah you were right it is ("{ENTER}") i tried that and it worked, ("(enter)") works fine for me in vb so i just assumed that for V C#
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

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

PostPosted: Tue Aug 28, 2007 5:10 pm    Post subject: Reply with quote

This doesn't really have anything to do with the problem, as it has been solved, but I suggest that you use

Code:

SendKeys.SendWait(...);


rather than

Code:

SendKeys.Send(...);


Why? SendKeys.Send is just going to send your message incredibly quickly, and will most likely not give the program/Windows/whatever a chance to respond. SendKeys.SendWait sends the key stroke, then waits for whatever to comprehend it, then continues on.
Back to top
View user's profile Send private message
TheIndianGuy
Advanced Cheater
Reputation: 102

Joined: 14 Jan 2007
Posts: 88

PostPosted: Tue Aug 28, 2007 6:22 pm    Post subject: Reply with quote

the point is the send the message quickly but thanks for the advise
Back to top
View user's profile Send private message
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