Hier is noch eins das ich gefunden habe nur das es für die 800x600 Auflösung ist.
; <COMPILER: v1.0.47.3>
WinGetPos, XXX, YYY, Width, Height, [Conquer2.0]
XXX+=400
YYY+=300
XXB=%XXX%
YYB=%YYY%
XXA=%XXX%
YYA=%YYY%
XXB+=480
YYB+=350
XXA-=480
YYA-=370
#Persistent
Menu, Tray, Icon, Shell32.dll, 44
Gui, Add, DropDownList, w53 x5 y10 Choose12 vColorChoice, Aqua|Black|Blue|Fuchsia|Gray|Green|Lime|Maroon|Navy|Olive|Purple|Red|Silver|Teal|White|Yellow|
Gui, Add, DropDownList, w53 x5 y35 Choose2 vwww, 1|2|3|4|5|6|7|8|9|FUN|
Gui, +toolwindow
Gui, Add, Button, x60 y10 w35 h47 vButton gStart, Reset
Gui, Show, x1 y1 h100 w150, Line
Gui, Show
Start:
Gui, Submit, Hide
CoordMode, Mouse, Screen
if www=FUN
{
www=99
}
Black = 000000
Green = 008000
Silver = C0C0C0
Lime = 00FF00
Gray = 808080
Olive = 808000
White = FFFFFF
Yellow = FFFF00
Maroon = 800000
Navy = 000080
Red = FF0000
Blue = 0000FF
Purple = 800080
Teal = 008080
Fuchsia = FF00FF
Aqua = 00FFFF
blank = 000001
Gui, 1:+LastFound +AlwaysOnTop +ToolWindow
Gui, 1:-Caption
Gui, 1:Color, 000001
WinSet, TransColor, 000001
GuiHwnd := WinExist()
Gui, 1:Show
Gui, 1:Maximize
SetTimer, DrawLine, 100
return
DrawLine:
MouseGetPos, M_x, M_y
if (M_x >= XXA and M_y >= YYA and M_x <= XXB and M_y <= YYB)
{
If (M_x != Old_M_x or M_y != Old_M_y)
WinSet, Redraw,, ahk_id %GuiHwnd%
Canvas_DrawLine(GuihWnd, XXX, YYY, M_x, M_y, www, %ColorChoice%)
Canvas_DrawLine(GuihWnd, M_x, M_y, M_x, M_y, 30, blank)
}
Old_M_x := M_x
Old_M_y := M_y
return
esc::exitapp
Canvas_DrawLine(hWnd, p_x1, p_y1, p_x2, p_y2, p_w, p_color)
{
hDC := DllCall("GetDC", UInt, hWnd)
hCurrPen := DllCall("CreatePen", UInt, 0, UInt, p_w, UInt, Convert_BGR(p_color))
DllCall("SelectObject", UInt,hdc, UInt,hCurrPen)
DllCall("gdi32.dll\MoveToEx", UInt, hdc, Uint,p_x1, Uint, p_y1, Uint, 0 )
DllCall("gdi32.dll\LineTo", UInt, hdc, Uint, p_x2, Uint, p_y2 )
DllCall("ReleaseDC", UInt, 0, UInt, hDC)
DllCall("DeleteObject", UInt,hCurrPen)
}
Convert_BGR(RGB)
{
StringLeft, r, RGB, 2
StringMid, g, RGB, 3, 2
StringRight, b, RGB, 2
Return, "0x" . b . g . r
}
-----
Hoffe jemand kann mir weiter helfen