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 


[C#] Timed SendKey
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Tyggo
Expert Cheater
Reputation: 0

Joined: 03 Jan 2008
Posts: 186

PostPosted: Tue Dec 30, 2008 7:11 pm    Post subject: Reply with quote

develito wrote:
Tyggo wrote:
Here's how I did it.

make a timer.

Set the timer interval in the properties.

In the form
Code:
Timer1.Enabled = true;


In the timer code
Code:
SendKeys.Send("Hello World!");


OR in the timer you could put....


Code:
SendKeys.Send ("({enter})");


Or any other key...


SendKeys sends messages to the focused window, and in the first post i stated that i want a unfocused window


I don't know if it's possible to keep sending keys in one window while you're doing something in another, if it is, it is beyond me.
Back to top
View user's profile Send private message
FullyAwesome
I post too much
Reputation: 0

Joined: 05 Apr 2007
Posts: 4438
Location: Land Down Under

PostPosted: Tue Dec 30, 2008 7:24 pm    Post subject: Reply with quote

Tyggo wrote:
I don't know if it's possible to keep sending keys in one window while you're doing something in another, if it is, it is beyond me.



fullyawesome again wrote:
PostMessage.

_________________
Back to top
View user's profile Send private message MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Tue Dec 30, 2008 8:07 pm    Post subject: Reply with quote

Use threads, they're way better than timers.
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Tue Dec 30, 2008 8:34 pm    Post subject: Reply with quote

psuedo code for ppl who cant read the shit themselves... Rolling Eyes
Code:

void ThreadProc_SendShit1()
{
   //code to send the keys to 1 window..
}
void ThreadProc_SendShit2()
{
   //code to send some others to another window..
}
HANDLE Threads[1] = {0};
DoItAgain:
Threads[0] = CreateThread(0,0,0,ThreadProc_SendShit1,0,0);
Threads[1] = CreateThread(0,0,0,ThreadProc_SendShit2,0,0);
WaitForMultipleObjects(&Threads,...);
CloseHandle(Threads[0]);
CloseHandle(Threads[1]);
__asm
{
   jmp DoItAgain
}


if i got some params wrong its pseudo code...

regard BanMe

oh p.s. if you cant equate this to C# you fail at coding and should rethink your choice in the use of your time.
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
Goto page Previous  1, 2
Page 2 of 2

 
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