简单的一个后台外挂。本人原创
#Include <WinAPI.au3>
Dim $hwnd
_Main1()
HotKeySet("{F9}", "TT1")
HotKeySet("{F10}", "T2")
HotKeySet("^{F9}", "T3")
;If ProcessExists("qqffo.exe") Then
;$hWnd=WinGetHandle( "QQ")
Func t3()
MsgBox(0,"",$hwnd)
EndFunc
;exit
While 1
Sleep(1000)
WEnd
Func T2()
Exit
EndFunc ;==>Terminate
Func T1()
$hWnd=WinGetHandle( "QQ自由幻想")
If @error Then
MsgBox(4096, "错误", "不能找到指定窗口")
Else
; Send some text directly to this window's edit control
ControlSend($hWnd, "", "Edit1", "AbCdE")
EndIf
Send("aaaa")
Send("{enter}")
EndFunc ;==>Terminate
Func TT1()
;MsgBox(0,"111",$hwnd)
;_WinAPI_makeLparam()
;Sleep(1000)
_WinAPI_PostMessage($hWnd, 0x0100,112, 0);112是F1
ControlSend($hWnd, "", "", "AbCdE")
_WinAPI_PostMessage($hWnd, 0x0100,13, 0);112是F1
;ControlSend($hWnd, "", "", "{f1}")
;ControlSend ($hWnd, "",$ii, "aaaa")
_WinAPI_PostMessage($hWnd, 0x0200,0,230*2^16+430);112是F1 00A0 是vm_mousemove
_WinAPI_PostMessage($hWnd, 0x0201,0, 230*2^16+430) ;发鼠标信息 H201 L_UP 202 L_down
Sleep(200)
_WinAPI_PostMessage($hWnd, 0x0202,0, 0)
;MsgBox(0,"111",$hwnd)
EndFunc
Func a1()
$hWnd=WinGetHandle( "传奇世界")
$cv=_WinAPI_PostMessage($hWnd, 0x0200,0,230*2^16+430);112是F1 00A0 是vm_mousemove
;_WinAPI_makeLparam()
Sleep(1000)
$cv=_WinAPI_PostMessage($hWnd, 0x0100,112, 0);112是F1
$cv1=_WinAPI_PostMessage($hWnd, 0x0201,0, 0) ;发鼠标信息 H201 L_UP 202 L_down
Sleep(2000)
$cv1=_WinAPI_PostMessage($hWnd, 0x0202,0, 0)
EndFunc
Func a2()
$hWnd=WinGetHandle( "计算器");计算3+4=7
$cv1=_WinAPI_PostMessage($hWnd, 0x0100,27, 0);清零
Sleep(5000)
$cv1=_WinAPI_PostMessage($hWnd, 0x0100,51, 0);3
Sleep(5000)
$cv1=_WinAPI_PostMessage($hWnd, 0x0100,107, 0);+
Sleep(5000)
$cv1=_WinAPI_PostMessage($hWnd, 0x0100,52, 0);4
Sleep(5000)
$cv1=_WinAPI_PostMessage($hWnd, 0x0100,13, 0);回车
EndFunc
Func _Main()
;Local $hwnd = GUICreate("test")
$hWnd=WinGetHandle( "传奇世界")
Local $iX = _WinAPI_GetMousePosX() ;绝对坐标
Local $iX2 = _WinAPI_GetMousePosX(True, $hwnd);相对于窗口来说
Local $iY = _WinAPI_GetMousePosY()
Local $iY2 = _WinAPI_GetMousePosY(True, $hwnd)
MsgBox(0, "Mouse Pos",$iX)
;MsgBox(4096, "Mouse Pos", "X = "+$iX + "Y = " +$iY+ "Client"+ "X = " +$iX2 +"Y = "+ $iY2)
EndFunc ;==>_Main
Func _Main1()
Opt('MustDeclareVars', 1)
Local $aWindows, $i
$aWindows = _WinAPI_EnumWindows()
For $i = 1 To UBound($aWindows) - 1
;If WinGetTitle($aWindows[$i][0]) = "无标题 - 记事本" Then MsgBox(0,"",$aWindows[$i][0])
If WinGetTitle($aWindows[$i][0]) = "QQ自由幻想(2.25公测版)" Then
$hwnd=$aWindows[$i][0]
EndIf
Next
EndFunc ;==>_Main |