[Hilfe] Bot schreiben der im Hintergrund laufen kann

07/28/2009 00:19 flexis#1
Hey liebe Community :)

Da ich in anderen Foren nur auf gehässige antworten und moral-aposteln gestoßen bin wende ich mich mal an euch ^^

Also...
Folgendes:

Ich würde gerne lernen Bots für Spiele zu schreiben die im Hintergrund laufen können während man etwas anderes macht.
Ich kenne mich damit so gar nicht aus (also mit bots die im hintergrund laufen) und wie ich das alles noch in Auto It einbaue, deswegen wollte ich mal fragen ob jemand zeit/lust hätte mir ein kurzes/langes TuT für etwas spezielleres wie z.B. das Game Silkroad zu schreiben (Wie das funzt das herauszufinden und einzubauen [natürlich idiotensicher xP]).
TuT´s über bots hab ich schon gefunden, aber meistens waren sie weitaus zu schwierig formuliert oder hatten viel zu viel "abstand" von gerade diesem Game ^^

Was ich mitbringe:
- Google ist mein Freund
- Grundlegende Auto It Sachen
- Motivation
- Kaffee

Hoffe jemand ist so nett :rolleyes:
07/28/2009 12:16 AllesVergeben#2
Da gibt's schon Tuts darüber, und wenn du noch keine Ahnung von Bots schreiben hast, dann solltest du dich erstmal damit vertraut machen.

Ich sag nur eins:

Quote:
Originally Posted by AutoIt Help File
One of the best new features with AutoIt v3 is the ability to work directly with certain types of Window Controls. Almost everything you see on a window is a control of some kind: buttons, listboxes, edit fields, static text are all controls. In fact Notepad is just one big "Edit" control! Because AutoIt works directly with a control they provide a more reliable way to automate than just sending keystrokes.



Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment!



Using the AutoIt Window Info Tool you can move your mouse around the window you are interested in and you will be given information of the control that is currently under your mouse.

A special description can be used as the controlID parameter used in most of the Control...() functions . This description can be used to identify a control by the following properties:

ID - The internal control ID. The Control ID is the internal numeric identifier that windows gives to each control. It is generally the best method of identifying controls. In addition to the AutoIt Window Info Tool, other applications such as screenreaders for the blind and Microsoft tools/APIs may allow you to get this Control ID
TEXT - The text on a control, for example "&Next" on a button
CLASS - The internal control classname such as "Edit" or "Button"
CLASSNN - The ClassnameNN value as used in previous versions of AutoIt, such as "Edit1"
REGEXPCLASS - Control classname using a regular expression
X \ Y \ W \ H - The position and size of a control.
INSTANCE - The 1-based instance when all given properties match.
One or more properties are used in the controlID parameter of a control command in the format:

[PROPERTY1:Value1; PROPERTY2:Value2]

Note: If this special format is not used then the parameter is taken to be a control ID (if numeric) or the ClassnameNN/text of the control (if a string). Although the special format is more longwinded than these methods it is much less ambiguous.

If a Value must contain a ";" it must be doubled.



e.g. Send text to the 1st Edit control in the Notepad window

PHP Code:
ControlSend("Untitled - Notepad""""[CLASS:Edit; INSTANCE:1]""This is some text"
or

PHP Code:
ControlSend("Untitled - Notepad""""[CLASSNN:Edit1]""This is some text"
or

PHP Code:
ControlSend("Untitled - Notepad""""Edit1""This is some text"


e.g. Click on control ID 254 in "My Window"

PHP Code:
ControlClick("My Window""""[ID:254]"
or

PHP Code:
ControlClick("My Window"""254


e.g. Click the 2nd instance of a "Button" control containing the text "Finish"

PHP Code:
ControlClick("My Window""""[CLASS:Button; TEXT:Finish; INSTANCE:2]"




Control Handle (HWND)
Using the ControlGetHandle function you can determine the Handle or HWND of a control. A handle is the unique identifier that Windows gives controls. The handle changes each time the control is created. This method of accessing controls is generally only designed for users who are familiar with working with handles.





Look under the contents for Function Reference \ Window Management \ Controls for a list of the functions that work with controls.
07/28/2009 16:12 flexis#3
da hab ich schon probleme ^^

und zwar weil ich jz speziell bei silkroad mit dem info tool nich die id´s von den verschiedenen sachen finde...

hab gehört das man über cheat engine das mit den hex adressen machen kann...
hab auch schon tut´s gefunden, die ich aber nicht übertragen konnte weil sie meistens sehr speziell waren

vielleicht könnte jemand etwas spezielleres für silkroad schreiben oder mir nur ein paar kleinere code schnipsel geben, z.B. von einer attack instanz oder von einer auto pot funktion oder irgend was ^^

bin schon motiviert am googlen aber nirgendwo finde ich mal code schnipsel an denen ich mir beispiele nehmen kann =/

hoffe das ist keine zu große sache nach der ich hier frage

danke trotzdem schonmal im vorraus
07/28/2009 16:44 Xereon#4
Quote:
Originally Posted by flexis View Post
da hab ich schon probleme ^^

und zwar weil ich jz speziell bei silkroad mit dem info tool nich die id´s von den verschiedenen sachen finde...

hab gehört das man über cheat engine das mit den hex adressen machen kann...
hab auch schon tut´s gefunden, die ich aber nicht übertragen konnte weil sie meistens sehr speziell waren

vielleicht könnte jemand etwas spezielleres für silkroad schreiben oder mir nur ein paar kleinere code schnipsel geben, z.B. von einer attack instanz oder von einer auto pot funktion oder irgend was ^^

bin schon motiviert am googlen aber nirgendwo finde ich mal code schnipsel an denen ich mir beispiele nehmen kann =/

hoffe das ist keine zu große sache nach der ich hier frage

danke trotzdem schonmal im vorraus
Also Leben und Mana Werte holt man sich gewöhlich aus der Memory, also via Cheatengine jene Adressen herrausfinden und dann in deinem Bot auslesen. Was das senden von Tasten angeht kann ich dir helfen:
Code:
; send single keyboard event to non active window
; event = pressed, down, up
; kdown = key down delay
; note: supports only lower case keys + NUMx, Fx, some special keys and @
Func KeySend($inkey, $evt ="pressed", $kdown = 50)
	$user32 = DllOpen("user32.dll")
	if $user32 = -1 Then
		ConsoleWrite("KeySend: cannot open user32.dll")
		Exit
	EndIf
		
    ; handling for special keys
	Switch StringUpper($inkey)
	Case "@"
		$skey = 0x40
		$lparam = 0x00100001
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYDOWN, "int", 0x71, "long", $lparam)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_CHAR, "int", $skey, "long", $lparam)
		Sleep(20)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYUP, "int", 0x71, "long", BitOR($lparam, 0xC0000000))		
	Case "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"
		$skey = 0x6f + Int(StringMid($inkey, 2)) 
		ContinueCase
	Case "NUM0", "NUM1", "NUM2", "NUM3", "NUM4", "NUM5", "NUM6", "NUM7", "NUM8" , "NUM9"
		if StringUpper(StringLeft($inkey, 3)) = "NUM" Then
			$skey = 0x60 + Int(StringMid($inkey, 4)) 
		EndIf
		ContinueCase
	Case "RETURN", "SPACE", "TAB", "BACK", "END", "HOME", "SNAPSHOT", "INSERT", "DELETE", "LEFT", "RIGHT", "UP", "DOWN"
		Switch StringUpper($inkey)
		Case "RETURN"
			$skey = 0x0D
		Case "SPACE"
			$skey = 0x20
		Case "TAB"
			$skey = 0x09
		Case "BACK"
			$skey = 0x08
		Case "END"
			$skey = 0x23
		Case "HOME"
			$skey = 0x24
		Case "SNAPSHOT"
			$skey = 0x2c
		Case "INSERT"
			$skey = 0x2d
		Case "DELETE"
			$skey = 0x2e
		Case "LEFT"
			$skey = 0x25
		Case "RIGHT"
			$skey = 0x27
		Case "UP"
			$skey = 0x26
		Case "DOWN"
			$skey = 0x28
		EndSwitch
		$ret = DllCall($user32, "int", "MapVirtualKey", "int", $skey, "int", 0)
		$lparam = BitShift($ret[0], -16)
		$lparam = BitOr($lparam, 1)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYDOWN, "int", $skey, "long", $lparam)
		Sleep($kdown)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYUP, "int", $skey, "long",   BitOR($lparam, 0xC0000000))
	Case Else ; default lower case key handling
		$key = DllCall($user32, "int", "VkKeyScan", "int", Asc(StringLower($inkey)))
		$skey = $key[0]		
		$ret = DllCall($user32, "int", "MapVirtualKey", "int", $skey, "int", 0)
		$lparam = BitShift($ret[0], -16)
		$lparam = BitOr($lparam, 1)
		Select
		Case $evt = "pressed"
			DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYDOWN, "int", $skey, "long", $lparam)
			Sleep($kdown)
			DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYUP, "int", $skey, "long",   BitOR($lparam, 0xC0000000))
		Case $evt = "down"
			DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYDOWN, "int", $skey, "long", $lparam)
		Case $evt = "up"
			DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYUP, "int", $skey, "long",   BitOR($lparam, 0xC0000000))
		EndSelect		
	EndSwitch

	DllClose($user32)
EndFunc
Und um ein Mausklick zu senden:
Code:
Func MakeLong($LoWord, $HiWord)
	Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))
EndFunc

; send mouse events to non active window
; button = left, right, none
; event = down, up, click, dclick, move
Func MouseSend($btn, $evt, $xpos, $ypos)
	$user32 = DllOpen("user32.dll")
	if $user32 = -1 Then
		ConsoleWrite("MouseSend: cannot open user32.dll")
		Exit
	EndIf
	
	;define missing constans
	$MK_LBUTTON       =  0x0001
	$WM_LBUTTONDOWN   =  0x0201
	;$WM_LBUTTONUP     =  0x0202 -> defined in WindowsConstants.au3
	$WM_LBUTTONDBLCLK =  0x0203
	$MK_RBUTTON       =  0x0002
	$WM_RBUTTONDOWN   =  0x0204
	$WM_RBUTTONUP     =  0x0205
	$WM_RBUTTONDBLCLK =  0x0206
	;$WM_MOUSEMOVE     =  0x0200 -> defined in WindowsConstants.au3
	
	;map button to event
	If $btn = "left" Then
		$button = $MK_LBUTTON
		$btdown = $WM_LBUTTONDOWN
		$btup = $WM_LBUTTONUP
		$btdbl = $WM_LBUTTONDBLCLK
	ElseIf $btn = "right" Then
		$button = $MK_RBUTTON
		$btdown = $WM_RBUTTONDOWN
		$btup = $WM_RBUTTONUP
		$btdbl = $WM_RBUTTONDBLCLK
	ElseIf $btn = "none" Then
		If Not ($evt = "move") Then
			ConsoleWrite(StringFormat("MouseSend: bad call:  %s , %s",$btn, $evt))
			Exit
		EndIf			
	Else  ;error
		ConsoleWrite(StringFormat("MouseSend: bad button: %s",$btn))
		Exit
	EndIf
	
	;send messages
	$pos = MakeLong($xpos, $ypos)
	Select
	Case $evt = "move"
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_MOUSEMOVE, "int", 0, "long", $pos)
	Case $evt = "down"
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btdown, "int", $button, "long", $pos)
	Case $evt = "up"
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btup, "int", 0, "long", $pos)
	Case $evt = "click"
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_MOUSEMOVE, "int", 0, "long", $pos)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btdown, "int", $button, "long", $pos)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btup, "int", 0, "long", $pos)
	Case $evt = "dclick"
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_MOUSEMOVE, "int", 0, "long", $pos)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btdown, "int", $button, "long", $pos)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btup, "int", 0, "long", $pos)
		Sleep(10)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btdbl, "int", $button, "long", $pos)
		DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btup, "int", 0, "long", $pos)		
	EndSelect
	DllClose($user32)
EndFunc
Solltes du gegebenfalls in eine UDF zusammenpacken.
07/28/2009 17:03 InToxic#5
Vllt solltest du angeben, woher du diese Funktionen hast, da sie nicht von dir sind...
07/28/2009 17:27 grean#6
Ich würde ja auch gerne Metin2 Bots schreiben.. Habe erfahrung mit Visual Basic .. AutoIt habe ich mir gerade geholt und habe momentan meinen PickUpBot gemacht *freu* jedoch blick ich das noch nicht mit der Form.. Ich würde gerne so eine Form also ein Fenster mit Button, etc haben.. So dass man auf einen Button klicken muss damit der Pickupbot startet.. Bei mir läuft das momentan so, ich drücke F7 dan startet er.. Ich drücke F8 dan hört er auf.. :(
07/28/2009 17:33 AllesVergeben#7
Benutz doch Koda

Kleiner Tipp:

Tastendruck Koda^^:
$nMsg = $Button then
EndIf


mfG
07/28/2009 17:39 Frezee#8
Quote:
Originally Posted by Xereon View Post
Also Leben und Mana Werte holt man sich gewöhlich aus der Memory, also via Cheatengine jene Adressen herrausfinden und dann in deinem Bot auslesen. Was das senden von Tasten angeht kann ich dir helfen:
Code:
; send single keyboard event to non active window
; event = pressed, down, up
; kdown = key down delay
; note: supports only lower case keys + NUMx, Fx, some special keys and @
Func KeySend($inkey, $evt ="pressed", $kdown = 50)
    $user32 = DllOpen("user32.dll")
    if $user32 = -1 Then
        ConsoleWrite("KeySend: cannot open user32.dll")
        Exit
    EndIf
        
    ; handling for special keys
    Switch StringUpper($inkey)
    Case "@"
        $skey = 0x40
        $lparam = 0x00100001
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYDOWN, "int", 0x71, "long", $lparam)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_CHAR, "int", $skey, "long", $lparam)
        Sleep(20)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYUP, "int", 0x71, "long", BitOR($lparam, 0xC0000000))        
    Case "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12"
        $skey = 0x6f + Int(StringMid($inkey, 2)) 
        ContinueCase
    Case "NUM0", "NUM1", "NUM2", "NUM3", "NUM4", "NUM5", "NUM6", "NUM7", "NUM8" , "NUM9"
        if StringUpper(StringLeft($inkey, 3)) = "NUM" Then
            $skey = 0x60 + Int(StringMid($inkey, 4)) 
        EndIf
        ContinueCase
    Case "RETURN", "SPACE", "TAB", "BACK", "END", "HOME", "SNAPSHOT", "INSERT", "DELETE", "LEFT", "RIGHT", "UP", "DOWN"
        Switch StringUpper($inkey)
        Case "RETURN"
            $skey = 0x0D
        Case "SPACE"
            $skey = 0x20
        Case "TAB"
            $skey = 0x09
        Case "BACK"
            $skey = 0x08
        Case "END"
            $skey = 0x23
        Case "HOME"
            $skey = 0x24
        Case "SNAPSHOT"
            $skey = 0x2c
        Case "INSERT"
            $skey = 0x2d
        Case "DELETE"
            $skey = 0x2e
        Case "LEFT"
            $skey = 0x25
        Case "RIGHT"
            $skey = 0x27
        Case "UP"
            $skey = 0x26
        Case "DOWN"
            $skey = 0x28
        EndSwitch
        $ret = DllCall($user32, "int", "MapVirtualKey", "int", $skey, "int", 0)
        $lparam = BitShift($ret[0], -16)
        $lparam = BitOr($lparam, 1)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYDOWN, "int", $skey, "long", $lparam)
        Sleep($kdown)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYUP, "int", $skey, "long",   BitOR($lparam, 0xC0000000))
    Case Else ; default lower case key handling
        $key = DllCall($user32, "int", "VkKeyScan", "int", Asc(StringLower($inkey)))
        $skey = $key[0]        
        $ret = DllCall($user32, "int", "MapVirtualKey", "int", $skey, "int", 0)
        $lparam = BitShift($ret[0], -16)
        $lparam = BitOr($lparam, 1)
        Select
        Case $evt = "pressed"
            DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYDOWN, "int", $skey, "long", $lparam)
            Sleep($kdown)
            DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYUP, "int", $skey, "long",   BitOR($lparam, 0xC0000000))
        Case $evt = "down"
            DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYDOWN, "int", $skey, "long", $lparam)
        Case $evt = "up"
            DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_KEYUP, "int", $skey, "long",   BitOR($lparam, 0xC0000000))
        EndSelect        
    EndSwitch

    DllClose($user32)
EndFunc
Und um ein Mausklick zu senden:
Code:
Func MakeLong($LoWord, $HiWord)
    Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))
EndFunc

; send mouse events to non active window
; button = left, right, none
; event = down, up, click, dclick, move
Func MouseSend($btn, $evt, $xpos, $ypos)
    $user32 = DllOpen("user32.dll")
    if $user32 = -1 Then
        ConsoleWrite("MouseSend: cannot open user32.dll")
        Exit
    EndIf
    
    ;define missing constans
    $MK_LBUTTON       =  0x0001
    $WM_LBUTTONDOWN   =  0x0201
    ;$WM_LBUTTONUP     =  0x0202 -> defined in WindowsConstants.au3
    $WM_LBUTTONDBLCLK =  0x0203
    $MK_RBUTTON       =  0x0002
    $WM_RBUTTONDOWN   =  0x0204
    $WM_RBUTTONUP     =  0x0205
    $WM_RBUTTONDBLCLK =  0x0206
    ;$WM_MOUSEMOVE     =  0x0200 -> defined in WindowsConstants.au3
    
    ;map button to event
    If $btn = "left" Then
        $button = $MK_LBUTTON
        $btdown = $WM_LBUTTONDOWN
        $btup = $WM_LBUTTONUP
        $btdbl = $WM_LBUTTONDBLCLK
    ElseIf $btn = "right" Then
        $button = $MK_RBUTTON
        $btdown = $WM_RBUTTONDOWN
        $btup = $WM_RBUTTONUP
        $btdbl = $WM_RBUTTONDBLCLK
    ElseIf $btn = "none" Then
        If Not ($evt = "move") Then
            ConsoleWrite(StringFormat("MouseSend: bad call:  %s , %s",$btn, $evt))
            Exit
        EndIf            
    Else  ;error
        ConsoleWrite(StringFormat("MouseSend: bad button: %s",$btn))
        Exit
    EndIf
    
    ;send messages
    $pos = MakeLong($xpos, $ypos)
    Select
    Case $evt = "move"
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_MOUSEMOVE, "int", 0, "long", $pos)
    Case $evt = "down"
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btdown, "int", $button, "long", $pos)
    Case $evt = "up"
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btup, "int", 0, "long", $pos)
    Case $evt = "click"
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_MOUSEMOVE, "int", 0, "long", $pos)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btdown, "int", $button, "long", $pos)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btup, "int", 0, "long", $pos)
    Case $evt = "dclick"
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $WM_MOUSEMOVE, "int", 0, "long", $pos)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btdown, "int", $button, "long", $pos)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btup, "int", 0, "long", $pos)
        Sleep(10)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btdbl, "int", $button, "long", $pos)
        DllCall($user32, "int", "PostMessage", "hwnd", $hwnd, "int", $btup, "int", 0, "long", $pos)        
    EndSelect
    DllClose($user32)
EndFunc
Solltes du gegebenfalls in eine UDF zusammenpacken.
Das teste ich gleich mal. Wenn das klappt, hab ich endlich mal die Funktion für minimierte Mausklicks gefunden... =)
07/28/2009 17:55 grean#9
Ich kapier das einfach nicht. Ist es echt so schwer einen Metin2 Hack zu erstellen?! Ich habe ja mit AutoIt einen PickUpBot erstellt.. Also da erscheint kein Fenster wenn man den startet sondern nur in der Symbolleiste ein kleines "A" .. Und den startet man mit Tasten also F7 usw.. Aber ich würde wie schon gesagt gerne das ich ihn mit Buttons anmachen kann.. Sowas wie die Hacks/Cheats von Banjo1 ^^

Ich habe Koda jedoch kapier ich das immer noch nicht.. Mit Visual basic geht das alles einfacher, jedoch kann man dort irgendwie keine Metin2 Hackprogramme erstellen ;( Bitte um Hilfe :P (PN PLEASE)
07/28/2009 18:12 AllesVergeben#10
Mit VisualBasic kann man ganz sicher Metin2 Hack-Programme erstellen :)

Probiers mal. Jede Scripsprache ist dazu fähig.


mfG
07/28/2009 23:22 Frezee#11
@Xereon: Dein Teil mit den minimierten Keys funktioniert leider end. Habe alles richtig gemacht. Geht trotzdem ned. Vielleicht könntest du ja mal schnell ein Beispiel posten.
Wäre nett!!
07/29/2009 00:07 InToxic#12
Wollen wir wetten, dass du $hwnd nicht deklariert hast?
07/29/2009 00:15 Frezee#13
Quote:
Originally Posted by InToxic View Post
Wollen wir wetten, dass du $hwnd nicht deklariert hast?
Die Wette gewinne ich. ;)

€:Hier mein Script:

PHP Code:
#RequireAdmin
#include <HiddenKey.au3>

Global $hwnd
$hwnd 
WinGetHandle("METIN2")

KeySend("i""pressed"200
07/29/2009 01:03 InToxic#14
Quote:
Originally Posted by Frezee View Post
Die Wette gewinne ich. ;)

€:Hier mein Script:

PHP Code:
#RequireAdmin
#include <HiddenKey.au3>

Global $hwnd
$hwnd 
WinGetHandle("METIN2")

KeySend("i""pressed"200
Es kann auch sein, dass du die WindowsConstants.au3 nicht included hast.

Poste mal deine Fehlermeldung, würd uns sicherlich weiterhelfen.
07/29/2009 12:53 Xereon#15
Quote:
Originally Posted by InToxic View Post
Vllt solltest du angeben, woher du diese Funktionen hast, da sie nicht von dir sind...
ja sorry, sind aus der tt6

Edit: Eben gerade gesehen das es auch eine 2te Seite gibt. Eigentlich sollten diese Funktionen ohne Probleme funktionieren.