problem beim senden von "/"

11/06/2009 06:29 pzyhô#1
wieder mal ich ^^

hab wieder maln Prob und hoff das vllt einer ne schnelle lösung weis.
ich hab ja en GM tool gemacht und hab genau dieses problem wie so manche mit dem senden von "/", manchmal funktioniert es manchmal kommt aber ne 4 oder 7 manchmal sogar 47 ._. weis nicht wie ich des machen soll hab schon einiges versucht zb {ALTUP}{NUMPAD4}{NUMPAD7}{ALTDOWN} oder {SHIFTUP}7{SHIFTDOWN} und auch schon mit dem ascii {ASC 47} aber ich komm immer auf das selbe d.h er sendet manchmal / manchmal 47.
achja is bei metin2 ...

hier mal wie ichs gemacht hab

Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 109, 29, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 8, 0, 89, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$windowname="Às¾s"
$handle  = WinGetHandle($windowname, "")


While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			Controlsend($windowname,'','', "{ENTER}")
			Controlsend($windowname,'','', "{ASC 047}")
			Controlsend($windowname,'','', "TEST")
			Controlsend($windowname,'','', "{ENTER}")
			Controlsend($windowname,'','', "{ENTER}")
			Sleep(200)

	EndSwitch
WEnd
und nicht sagen rtfm ^^ hab schon alles durchsucht aber nix gefunden, hoffe hier auf ne vernünftig erklärte antwort
11/06/2009 13:23 Syc0n#2
PHP Code:
#include <WindowsConstants.au3>

$hwnd WinGetHandle("Guild Wars")

SleeP(1500)
Syc0n()

Func Syc0n()
    
$user32 DllOpen("user32.dll")
    If 
$user32 = -1 Then
        ConsoleWrite
("Cannot open user32.dll")
        Exit
    EndIf
    
$skey 0x2F
    $lparam 
0x00100001
    DllCall
($user32"int""PostMessage""hwnd"$hwnd"int"$WM_KEYDOWN"int"0x71"int"$lparam)
    
DllCall($user32"int""PostMessage""hwnd"$hwnd"int"$WM_CHAR"int"$skey"int"$lparam)
    
Sleep(20)
    
DllCall($user32"int""PostMessage""hwnd"$hwnd"int"$WM_KEYUP"int"0x71"int"BitOR($lparam0xC0000000))
    
DllClose($user32)
EndFunc