controlsend with {a down}

10/19/2009 17:51 unknown661#1
hi i want du create a backgroundmode for my aion bot. but i cannot send a {a down} to my aion window.


Code:
ControlSend("AION Client", "", "", "{a down}")
did not work. can somebody help me pls?
10/20/2009 00:38 N.E.O.#2
I think the ControlSend() orders, don't support up, down calls.
10/20/2009 09:55 buFFy!#3
Quote:
Originally Posted by N.E.O. View Post
I think the ControlSend() orders, don't support up, down calls.
You're talking a lot of s*** :)

AION has GameGuard or uses DirectInput. Think about it ;)
10/20/2009 11:57 unknown661#4
yes but gameguard is not on atm. a simple Send works und you can also send normal character with controlsend.
10/20/2009 14:31 buFFy!#5
Then AION is using DirectInput and is Covering SendMessage/Post Message.
That mean's for you, there is actually no way to control your Character via those Functions.

You could use Intern Function's or try editing Memories..

All i'm writing is guessed, cuz i don't have AION.
10/20/2009 15:38 N.E.O.#6
Quote:
Originally Posted by u-coRe View Post
You're talking a lot of s*** :)

AION has GameGuard or uses DirectInput. Think about it ;)
Wieso geht das dann bei: Mozilla Firefox, Internet Explorer, Guild Wars, WoW, ICQ.. auch nicht?
10/20/2009 16:01 buFFy!#7
Wenn du nen Unterschied siehst dann bist du besser als ich ;)
Code:
Run("notepad.exe")
WinWaitActive("Unbenannt - Editor")
Sleep(500)

;//Send
MsgBox(0x40, "Send Test", "Send!")
Send("{a down}")
Sleep(5000)

;//
MsgBox(0x40, "Send Test", "ControlSend!")
ControlSend("Unbenannt - Editor", "", "", "{a down}")
Sleep(5000)
10/20/2009 17:14 unknown661#8
Quote:
Originally Posted by u-coRe View Post
Wenn du nen Unterschied siehst dann bist du besser als ich ;)
Code:
Run("notepad.exe")
WinWaitActive("Unbenannt - Editor")
Sleep(500)

;//Send
MsgBox(0x40, "Send Test", "Send!")
Send("{a down}")
Sleep(5000)

;//
MsgBox(0x40, "Send Test", "ControlSend!")
ControlSend("Unbenannt - Editor", "", "", "{a down}")
Sleep(5000)
ja
Code:
Run("notepad.exe")
WinWaitActive("Unbenannt - Editor")
Sleep(500)

MsgBox(0x40, "Send Test", "ControlSend!")
ControlSend("Unbenannt - Editor", "", "", "{a down}")
Sleep(5000)
geht nicht
10/21/2009 08:38 buFFy!#9
Oh gott..dann nimm halt ne andre Funktion digger.
Code:
; #FUNCTION# ====================================================================================================================
; Name...........: SimulKey
; Description ...: Simulate a Key-Send to a specified handle in the Background
; Author ........: Felix Lehmann alias u-coRe (elitepvpers)
; Modified.......: If you modify this Script, please enter your name here
; Remarks .......: None
; Related .......: -
; Parameters ....: $hwnd = Specified Window to Send to
; ...............: $key = Key or String to Send (If String $string have to be enabled [see $string])
; ...............: $string = Set this to 1 If your "$key" is a string
; ...............: $state = Set this to 'up' or 'down' if u want a special event | Default is press the Key 1 Time
; ...............: $delay = The delay to hold the key down
; Return Values .: 1 = Done | -1 = Couldn't load user32.dll
; Link ..........; http://www.elitepvpers.com/forum/guild-wars/
; ===============================================================================================================================
Func SimulKey($hWnd, $key, $string = 0, $state = 'skip', $delay = 10)
	;//Open DLL (user32)
	$user32 = DllOpen('user32.dll')
	If $user32 = -1 Then
		SetError(-1, 1, -1)
	EndIf

	;//Handle Special Keys
	Switch StringLower($key)
		Case 'enter'
			$WM_ENTER = 0x0d
			$dCall = DllCall($user32, 'int', "MapVirtualKey", 'int', $WM_ENTER, 'int', 0)
			$lParam = BitOR(BitShift($dCall[0], -16), 1)
		Case 'space'
			$WM_SPACE = 0x20
			$dCall = DllCall($user32, 'int', "MapVirtualKey", 'int', $WM_SPACE, 'int', 0)
			$lParam = BitOR(BitShift($dCall[0], -16), 1)
		Case 'tab'
			$WM_TAB = 0x09
			$dCall = DllCall($user32, 'int', "MapVirtualKey", 'int', $WM_TAB, 'int', 0)
			$lParam = BitOR(BitShift($dCall[0], -16), 1)
			;//Handle Standard Keys
		Case Else
			;//Stringmode 1
			If $string = 1 Then
				$split = StringSplit($key, "")
				For $ctn = 1 To $split[0]
					$split[$ctn] = Asc(StringLower($split[$ctn]))
				Next
				For $ctn = 1 To $split[0]
					$dCall = DllCall($user32, 'int', "VkKeyScan", 'int', $split[$ctn])
					$lParamAsc = DllCall($user32, 'int', "MapVirtualKey", 'int', $dCall[0], 'int', 0)
					$lParam = BitOR(BitShift($lParamAsc[0], -16), 1)
					$lUpParam = BitOR($lParam, 0xC0000000)
					DllCall($user32, 'int', "PostMessage", 'hwnd', $hWnd, 'int', $WM_KEYDOWN, 'int', $dCall[0], 'int', $lParam)
					Sleep($delay)
					DllCall($user32, 'int', "PostMessage", 'hwnd', $hWnd, 'int', $WM_KEYUP, 'int', $dCall[0], 'int', $lUpParam)
					Sleep(100)
				Next
				;//Stringmode 0
			ElseIf $string = 0 Then
				$key = Asc(StringLower($key))
				$dCall = DllCall($user32, 'int', "VkKeyScan", 'int', $key)
				$lParamAsc = DllCall($user32, 'int', "MapVirtualKey", 'int', $dCall[0], 'int', 0)
				$lParam = BitOR(BitShift($lParamAsc[0], -16), 1)
			EndIf
	EndSwitch
	$lUpParam = BitOR($lParam, 0xC0000000)
	If $string = 0 Then
		Switch StringLower($state)
			Case 'skip'
				DllCall($user32, 'int', "PostMessage", 'hwnd', $hWnd, 'int', $WM_KEYDOWN, 'int', $dCall[0], 'int', $lParam)
				Sleep($delay)
				DllCall($user32, 'int', "PostMessage", 'hwnd', $hWnd, 'int', $WM_KEYUP, 'int', $dCall[0], 'int', $lUpParam)
			Case 'down'
				DllCall($user32, "int", "PostMessage", "hwnd", $hWnd, "int", $WM_KEYDOWN, "int", $dCall[0], "int", $lParam)
			Case 'up'
				DllCall($user32, "int", "PostMessage", "hwnd", $hWnd, "int", $WM_KEYUP, "int", $dCall[0], "int", $lParam)
		EndSwitch
	EndIf
	DllClose($user32)
	Return 1
EndFunc   ;==>SimulKey
10/21/2009 10:07 unknown661#10
vielen dank, nur leider funktionierts bei mir nicht =(
Code:
#include <WindowsConstants.au3>

$hWnd = WinGetHandle("Neues Textdokument (3).txt - Editor")
WinSetState($hwnd, "", @SW_HIDE)
SimulKey($hwnd, 'enter')
WinSetState($hwnd, "", @SW_SHOW)
die funktion hab ich natürlich auch drinnen
10/21/2009 14:11 buFFy!#11
Quote:
Originally Posted by unknown661 View Post
vielen dank, nur leider funktionierts bei mir nicht =(
Code:
#include <WindowsConstants.au3>

$hWnd = WinGetHandle("Neues Textdokument (3).txt - Editor")
WinSetState($hwnd, "", @SW_HIDE)
SimulKey($hwnd, 'enter')
WinSetState($hwnd, "", @SW_SHOW)
die funktion hab ich natürlich auch drinnen
#include <WindowsConstants.au3>

$hWnd = WinGetHandle("Neues Textdokument (3).txt - Editor")
WinSetState($hwnd, "", @SW_HIDE)
SimulKey($hwnd, 'enter', 0, 'down')
WinSetState($hwnd, "", @SW_SHOW)
10/21/2009 15:11 Xeranor#12
Vesuchs so:
Code:
$handle = WinGetHandle("Editor")
ControlSend($handle,"","","ROFLMAOW")
10/21/2009 19:48 unknown661#13
i do not know whats wrong but it works with no window...

Code:
#include <WindowsConstants.au3>

$hwnd = WinGetHandle("AION Client")
MsgBox(0,"",$hwnd)
WinSetState($hwnd, "", @SW_HIDE)
SimulKey($hwnd, 'w',0,'down',1000)
WinSetState($hwnd, "", @SW_SHOW)
10/21/2009 20:23 buFFy!#14
Quote:
Originally Posted by u-coRe View Post
Then AION is using DirectInput and is Covering SendMessage/Post Message.
That mean's for you, there is actually no way to control your Character via those Functions.

You could use Intern Function's or try editing Memories..

All i'm writing is guessed, cuz i don't have AION.
^this.
10/21/2009 20:47 unknown661#15
ein Send geht aber bei Aion auch und ein Controlsend nur unterstützt halt controlsend kein up und down.