Code:
#include <WindowsConstants.au3>
#include <WinAPI.au3>
mycross(640,400,20); mitte einstellen
func mycross($start_x,$start_y,$mylenght)
$hDC = _WinAPI_GetWindowDC(0)
$Color = 0xFF
$hPen = DLLCall("gdi32.dll","int","CreatePen","int",0,"int",2,"int",$Color)
$hPen = $hPen[0]
$obj_orig = _WinAPI_SelectObject($hDC, $hPen)
_GDI_DrawLine($hDC, $start_x - $mylenght, $start_y, $start_x - 5, $start_y);orizzontale dx
_GDI_DrawLine($hDC, $start_x + $mylenght , $start_y, $start_x + 5, $start_y);orizzontale sx
_GDI_DrawLine($hDC, $start_x, $start_y - $mylenght, $start_x, $start_y - 5);verticale up
_GDI_DrawLine($hDC, $start_x, $start_y + $mylenght, $start_x, $start_y + 5);verticale down
Sleep(3000) ; zeigt das CH 3sek.
_WinAPI_RedrawWindow(_WinAPI_GetDesktopWindow(), 0, 0, $RDW_INVALIDATE+$RDW_ALLCHILDREN)
_WinAPI_SelectObject($hDC, $obj_orig[0])
_WinAPI_DeleteObject($hPen)
_WinAPI_ReleaseDC(0, $hDC)
EndFunc
Func _GDI_DrawLine($DC, $x1, $y1, $x2, $y2)
DLLCall("gdi32.dll","int","MoveToEx","int",$DC,"int",$x1,"int",$y1,"int",0)
DLLCall("gdi32.dll","int","LineTo","int",$DC,"int",$x2,"int",$y2)
EndFunc
Code:
HotKeySet("{F5}", "_Run")
HotKeySet("{F6}", "_pause")
HotKeySet("{F7}", "_exit")
$color1=0x0000FF ;gelb = 0x00F0F0 ; rot = 0x0000FF ; grün = 0x00FF00 ; blau = 0xFF0000 ; weiß = =0xFFFFFF ; lila=0xAC00A9
TrayTip("Hotkeys:", "F5=Cross ; F6=paused ; F7=Exit", 5)
_pause()
Func _Run()
$handle = ControlGetHandle("paskjh^2g387zaisug2937856", "", 1);$handle = ControlGetHandle("Counter-Strike", "", 1)
While 1
SetPixel($handle, @DesktopWidth/2, @DesktopHeight/2, $color1)
For $i=1 To 10
SetPixel($handle, @DesktopWidth/2+$i, @DesktopHeight/2, $color1)
SetPixel($handle, @DesktopWidth/2-$i, @DesktopHeight/2, $color1)
Sleep(0.1)
SetPixel($handle, @DesktopWidth/2, @DesktopHeight/2+$i, $color1)
SetPixel($handle, @DesktopWidth/2, @DesktopHeight/2-$i, $color1)
Next
Sleep(0.1)
WEnd
EndFunc ;==>_Run
Func SetPixel($handle, $x, $y, $color)
$dc = DllCall("user32.dll", "int", "GetDC", "hwnd", $handle)
$setpixel = DllCall("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color)
$realesedc = DllCall("user32.dll", "int", "ReleaseDC", "hwnd", 0, "int", $dc[0])
EndFunc ;==>SetPixel
Func _pause()
While True
Sleep(1000)
WEnd
EndFunc ;==>_pause
Func _exit()
Exit
EndFunc ;==>_exit
Wenns Hilft :D