#include <GDIplus.au3>
#include <guiconstants.au3>
#RequireAdmin
_GDIPlus_Startup()
OnAutoItExitRegister("Stdown")
Do
Sleep(99)
$pid = ProcessExists("iw5sp.exe")
Until $pid
Global $hGui = _GDIPlus_GraphicsCreateFromHWND(_GetHwndFromPID($p id))
global $hButton1 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\sandwich.png")
Global $hButton2 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\sandwich.png")
_GDIPlus_GraphicsDrawImage($hGui,$hButton1, 100, 100)
$Pic1 = True
While 1
Switch GUIGetMsg()
Case -3
Exit
EndSwitch
For $i = 0 to 5 Step 1
_GDIPlus_GraphicsDrawImage($hGui,$hButton1, 100+$i, 100)
Next
_DrawLine(Random(-300, 500, 1),Random(-300, 500, 1), Random(-300, 500, 1), Random(-300, 500, 1), 0xff000000)
WEnd
Func _DrawLine($x, $y, $x2, $y2, $color)
If $color = 0 Then $color = 0xffededed
$hPen = _GDIPlus_PenCreate($color)
_GDIPlus_GraphicsDrawLine($hGui, $x, $y, $x2, $y2, $hPen)
_GDIPlus_PenDispose($hPen)
Return 1
EndFunc
Func Stdown()
_GDIPlus_GraphicsDispose($hGui)
_GDIPlus_Shutdown()
EndFunc
Func _GetHwndFromPID($PID)
$hWnd = 0
$stPID = DllStructCreate("int")
Do
$winlist2 = WinList()
For $i = 1 To $winlist2[0][0]
If $winlist2[$i][0] <> "" Then
DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $winlist2[$i][1], "ptr", DllStructGetPtr($stPID))
If DllStructGetData($stPID, 1) = $PID Then
$hWnd = $winlist2[$i][1]
ExitLoop
EndIf
EndIf
Next
Sleep(100)
Until $hWnd
Return $hWnd
EndFunc ;==>_GetHwndFromPID
Habs mal für dich in MW3 getestet, flackert ziemlich. Die dicken teile des Codes sind wichtig ;)