<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt]]></title><description><![CDATA[<p>Hallo an alle,</p>
<p>ich wollte das alle X Sekunden die Taste 1 gedrückt wird. Das funktioniert auch Mein Programm funzt im Notepad, Word - Windows Explorer nur wollte ich das die Taste 1 in nem Spiel (Dark Age of Camelot) gedrückt wird.</p>
<p>jedoch da gehts nich obwohl das programm läuft (hab die TastaturLED´s blinken lassen zur Kontrolle)</p>
<p>muss man da irgendwas angeben wenn man ne Anwenung wie n Spiel Startet, oder kann ich das durch evtl kleine Änderungen ausgleichen.</p>
<p>MfG</p>
<p>ein kleines Irrlicht.</p>
<p>Zum Runterladen: <a href="http://www.daoc.dark-empire.net/Testprogramm.rar" rel="nofollow">http://www.daoc.dark-empire.net/Testprogramm.rar</a></p>
<p>Hier der Quelltext:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

const char	szAppName[] = &quot;Uebung 1: Timer programmieren&quot;;		// Global, da in WndProc benutzt

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
	MSG			msg;
	HWND		hWnd;
	WNDCLASS	wc;

	wc.cbClsExtra			= 0;
	wc.cbWndExtra			= 0;
	wc.hbrBackground		= (HBRUSH) GetStockObject(LTGRAY_BRUSH);
	wc.hCursor				= LoadCursor(NULL, IDC_ARROW);
	wc.hIcon				= LoadIcon(NULL, IDI_APPLICATION);
	wc.hInstance			= hInstance;
	wc.lpfnWndProc			= WndProc;
	wc.lpszClassName		= szAppName;
	wc.lpszMenuName			= NULL;
	wc.style				= CS_HREDRAW | CS_VREDRAW;

	RegisterClass(&amp;wc);

	hWnd = CreateWindow(	szAppName,
							szAppName,
							WS_OVERLAPPEDWINDOW,
							CW_USEDEFAULT,
							CW_USEDEFAULT,
							CW_USEDEFAULT,
							CW_USEDEFAULT,
							NULL,
							NULL,
							hInstance,
							NULL);

	ShowWindow(hWnd, iCmdShow);
	UpdateWindow(hWnd);

	while (GetMessage(&amp;msg, NULL, 0, 0))
	{
		TranslateMessage(&amp;msg);
		DispatchMessage(&amp;msg);
	}

	return msg.wParam;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	const UINT	TimerID	= 1;	
	const int	iDelay	= 2000;								//	= Zeit einstellen

	switch (message)
	{
	case WM_CREATE:
		{
			SetTimer(hWnd, TimerID, iDelay, NULL);			// Timer setzen
			return 0;
		}
	case WM_TIMER:											// WM_TIMER
		{
				keybd_event(0x31, 0, 0, NULL);				// '1' drücken
				keybd_event(0x31, 0, KEYEVENTF_KEYUP, 0);	// '1' loslassen
				keybd_event(144, 0, 0, 0);					// Num Lock 
				keybd_event(144, 0, 0x02, 0);				// an 
				Sleep(1000); 
				keybd_event(144, 0, 0, 0);					// Num Lock 
				keybd_event(144, 0, 0x02, 0);				// aus 
				Sleep(500); 
				keybd_event(20, 0, 0, 0);					// Caps Lock 
				keybd_event(20, 0, 0x02, 0);				// an 
				Sleep(1000); 
				keybd_event(20, 0, 0, 0);					// Caps Lock 
				keybd_event(20, 0, 0x02, 0);				// aus 
				Sleep(500); 
				keybd_event(145, 0, 0, 0);					// Scroll Lock 
				keybd_event(145, 0, 0x02, 0);				// an 
				Sleep(1000); 
				keybd_event(145, 0, 0, 0);					// Scroll Lock 
				keybd_event(145, 0, 0x02, 0);				// aus 
				Sleep(500); 

				return 0;

		}
	case WM_DESTROY:
		{
			KillTimer(hWnd, TimerID);						// nicht vergessen: Timer löschen
			PostQuitMessage(0);
			return 0;
		}
	}
	return DefWindowProc(hWnd, message, wParam, lParam);
}
</code></pre>
<p>edit: sfds</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/80680/alle-20-sec-aktion-ausführen-aktion-geht-nur-bedingt</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 10:00:17 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/80680.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Jul 2004 12:34:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Sun, 25 Jul 2004 22:16:03 GMT]]></title><description><![CDATA[<p>Hallo an alle,</p>
<p>ich wollte das alle X Sekunden die Taste 1 gedrückt wird. Das funktioniert auch Mein Programm funzt im Notepad, Word - Windows Explorer nur wollte ich das die Taste 1 in nem Spiel (Dark Age of Camelot) gedrückt wird.</p>
<p>jedoch da gehts nich obwohl das programm läuft (hab die TastaturLED´s blinken lassen zur Kontrolle)</p>
<p>muss man da irgendwas angeben wenn man ne Anwenung wie n Spiel Startet, oder kann ich das durch evtl kleine Änderungen ausgleichen.</p>
<p>MfG</p>
<p>ein kleines Irrlicht.</p>
<p>Zum Runterladen: <a href="http://www.daoc.dark-empire.net/Testprogramm.rar" rel="nofollow">http://www.daoc.dark-empire.net/Testprogramm.rar</a></p>
<p>Hier der Quelltext:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

const char	szAppName[] = &quot;Uebung 1: Timer programmieren&quot;;		// Global, da in WndProc benutzt

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
	MSG			msg;
	HWND		hWnd;
	WNDCLASS	wc;

	wc.cbClsExtra			= 0;
	wc.cbWndExtra			= 0;
	wc.hbrBackground		= (HBRUSH) GetStockObject(LTGRAY_BRUSH);
	wc.hCursor				= LoadCursor(NULL, IDC_ARROW);
	wc.hIcon				= LoadIcon(NULL, IDI_APPLICATION);
	wc.hInstance			= hInstance;
	wc.lpfnWndProc			= WndProc;
	wc.lpszClassName		= szAppName;
	wc.lpszMenuName			= NULL;
	wc.style				= CS_HREDRAW | CS_VREDRAW;

	RegisterClass(&amp;wc);

	hWnd = CreateWindow(	szAppName,
							szAppName,
							WS_OVERLAPPEDWINDOW,
							CW_USEDEFAULT,
							CW_USEDEFAULT,
							CW_USEDEFAULT,
							CW_USEDEFAULT,
							NULL,
							NULL,
							hInstance,
							NULL);

	ShowWindow(hWnd, iCmdShow);
	UpdateWindow(hWnd);

	while (GetMessage(&amp;msg, NULL, 0, 0))
	{
		TranslateMessage(&amp;msg);
		DispatchMessage(&amp;msg);
	}

	return msg.wParam;
}

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	const UINT	TimerID	= 1;	
	const int	iDelay	= 2000;								//	= Zeit einstellen

	switch (message)
	{
	case WM_CREATE:
		{
			SetTimer(hWnd, TimerID, iDelay, NULL);			// Timer setzen
			return 0;
		}
	case WM_TIMER:											// WM_TIMER
		{
				keybd_event(0x31, 0, 0, NULL);				// '1' drücken
				keybd_event(0x31, 0, KEYEVENTF_KEYUP, 0);	// '1' loslassen
				keybd_event(144, 0, 0, 0);					// Num Lock 
				keybd_event(144, 0, 0x02, 0);				// an 
				Sleep(1000); 
				keybd_event(144, 0, 0, 0);					// Num Lock 
				keybd_event(144, 0, 0x02, 0);				// aus 
				Sleep(500); 
				keybd_event(20, 0, 0, 0);					// Caps Lock 
				keybd_event(20, 0, 0x02, 0);				// an 
				Sleep(1000); 
				keybd_event(20, 0, 0, 0);					// Caps Lock 
				keybd_event(20, 0, 0x02, 0);				// aus 
				Sleep(500); 
				keybd_event(145, 0, 0, 0);					// Scroll Lock 
				keybd_event(145, 0, 0x02, 0);				// an 
				Sleep(1000); 
				keybd_event(145, 0, 0, 0);					// Scroll Lock 
				keybd_event(145, 0, 0x02, 0);				// aus 
				Sleep(500); 

				return 0;

		}
	case WM_DESTROY:
		{
			KillTimer(hWnd, TimerID);						// nicht vergessen: Timer löschen
			PostQuitMessage(0);
			return 0;
		}
	}
	return DefWindowProc(hWnd, message, wParam, lParam);
}
</code></pre>
<p>edit: sfds</p>
]]></description><link>https://www.c-plusplus.net/forum/post/566846</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/566846</guid><dc:creator><![CDATA[Irrlicht]]></dc:creator><pubDate>Sun, 25 Jul 2004 22:16:03 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Fri, 23 Jul 2004 12:43:57 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich glaube das solltest du eher im WinAPI-Forum fragen ;).</p>
<p>mfg<br />
v R</p>
]]></description><link>https://www.c-plusplus.net/forum/post/566852</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/566852</guid><dc:creator><![CDATA[virtuell Realisticer]]></dc:creator><pubDate>Fri, 23 Jul 2004 12:43:57 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Fri, 23 Jul 2004 12:50:57 GMT]]></title><description><![CDATA[<p>Hey, ein DAOC Spieler. Welcher Server, welches Reich? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/566860</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/566860</guid><dc:creator><![CDATA[CarstenJ]]></dc:creator><pubDate>Fri, 23 Jul 2004 12:50:57 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Fri, 23 Jul 2004 13:03:29 GMT]]></title><description><![CDATA[<p>... und jemand der anscheinend versucht zu schummeln ... vergiss es lieber gleich du unmoralischer mensch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>ich weis das es das gibt. leute, die sich tbots schreiben das ihre figuren den ganzen tag und nacht rumrennen und erfahrungspunkte sammeln.</p>
<p>echt fair. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/566869</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/566869</guid><dc:creator><![CDATA[cheater_hasser]]></dc:creator><pubDate>Fri, 23 Jul 2004 13:03:29 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Fri, 23 Jul 2004 13:12:04 GMT]]></title><description><![CDATA[<p>wenigsten gibt er sich mühe und versucht es selbst zu coden <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/566877</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/566877</guid><dc:creator><![CDATA[david_14]]></dc:creator><pubDate>Fri, 23 Jul 2004 13:12:04 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Fri, 23 Jul 2004 22:53:38 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>danke für dir vielen Antworten.<br />
Also es geht um folgendes: ich bin Schneider und benutz das Gold, das ich von creepen hab um zu powercraften.</p>
<p>Jedoch muss ich da die ganze Zeit so ca 20 Stück von irgend nem Handschuh machen. (alle 35 sec maustaste oder ne zahl drücken)</p>
<p>wenn ich aber für 20 stück die Sachen einkaufen kann und dann mal so einfach 20 stück herstellen kann, heisst das für mich ich kann 2 min vom rechner weg.</p>
<p>Ich persöhnlich seh das nicht so direkt als bot den ich einschalt und kann den die ganze nacht laufen lassen, da ich ja alle 2 min die sachen verkaufen, neue einkaufen und aus der crafting liste ein gelbes Item raussuchen muss.</p>
<p>MfG</p>
<p>Ein kleines Irrlicht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/567206</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/567206</guid><dc:creator><![CDATA[Irrlicht]]></dc:creator><pubDate>Fri, 23 Jul 2004 22:53:38 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Sat, 24 Jul 2004 08:17:55 GMT]]></title><description><![CDATA[<p>aber von der taste 1 zu →→→↑→↑←↑↑→rechtsklick→↑← enter is es auch nich so weit-.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/567248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/567248</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Sat, 24 Jul 2004 08:17:55 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Sat, 24 Jul 2004 10:12:59 GMT]]></title><description><![CDATA[<p>Lass doch mal testweise die Taste etwas länger gedrückt, für 10/20/50ms oder so. Denn ich glaub DirectInput macht nur eine Momentaufnahme der gedrückten tasten, und mit deiner Methode ist dieser Moment ja nicht gerade sehr lang.</p>
<p>BTW ist keybd_event &quot;veraltet&quot;. Man verwendet jetzt SendInput, hat IMHO aber nichts mit dem Problem zu tun.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/567295</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/567295</guid><dc:creator><![CDATA[D*niel *chumann]]></dc:creator><pubDate>Sat, 24 Jul 2004 10:12:59 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Sat, 24 Jul 2004 16:21:15 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=3630" rel="nofollow">Gerard</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/567489</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/567489</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 24 Jul 2004 16:21:15 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Sun, 25 Jul 2004 21:04:18 GMT]]></title><description><![CDATA[<p>funzt - mit mouseevent klappts</p>
<p>muss halt die maus immer posotionieren.</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/568114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/568114</guid><dc:creator><![CDATA[Irrlicht]]></dc:creator><pubDate>Sun, 25 Jul 2004 21:04:18 GMT</pubDate></item><item><title><![CDATA[Reply to Alle 20 Sec Aktion ausführen - Aktion geht nur bedingt on Sun, 25 Jul 2004 22:18:44 GMT]]></title><description><![CDATA[<p>Bei Online-Spielen ist cheaten nicht nur unfair, sondern auch verboten.</p>
<p>Bitte überleg dir gut, ob du dein Programm wirklich benutzt. Die Cheat-Erkennung funktioniert bei vielen Online-Spielen recht gut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/568162</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/568162</guid><dc:creator><![CDATA[Christoph]]></dc:creator><pubDate>Sun, 25 Jul 2004 22:18:44 GMT</pubDate></item></channel></rss>