;Скрипт рисует круговую диаграмму ;по идее программка смотрит инет статистику и показывает в графическом виде ;сколько осталось траффика ;может кто подрисует диаграмму, чтоб она была по объемней как в Экселе #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <timers.au3> #include <FontConstants.au3> HotKeySet("{ESC}", "_ende") Global $ballpos1=200 Global $ballpos2=80 Global $BewegungSenkrecht=Random(5, 7, 1) Global $BewegungWagrecht=Random(5, 7, 1) Global $Speed=10 Global $tRECT, $hFont, $hOldFont, $hDC $tRECT = DllStructCreate($tagRect) DllStructSetData($tRECT, "Left", 10) DllStructSetData($tRECT, "Top", 5) DllStructSetData($tRECT, "Right", 300) DllStructSetData($tRECT, "Bottom", 800) _GDIPlus_Startup() $pr = 50 $prm = -360+10 ;Global $hGui = GUICreate("Rahmen", @DesktopWidth, @DesktopHeight, -1, -1, $WS_POPUP, $WS_EX_LAYERED) Global $hGui = GUICreate("Rahmen",400, 300,800, 100, $WS_POPUP, $WS_EX_LAYERED) $hDC = _WinAPI_GetDC($hGui) ;GUISetBkColor(0xABCDEF) ;прозрачное окно _WinAPI_SetLayeredWindowAttributes($hGui, 0xABCDEF, 255) GUISetState() Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui) ;$hDC = _WinAPI_GetDC(0) $hPen = _GDIPlus_PenCreate(0xFF0000FF, 2) ;$hPen = _GDIPlus_PenCreate(0xcc000000, 2) Global $vanish = _GDIPlus_PenCreate(0xFFFF0000 , 70) ;_GDIPlus_BrushCreateSolid(0xffff1a10) $hBrush2 = _GDIPlus_BrushCreateSolid(0xff42b8c8) ;синий $hBrush = _GDIPlus_BrushCreateSolid(0xffff1a10) _GDIPlus_GraphicsDrawEllipse($hGraphic, $ballpos1, $ballpos2, 150, 100, $hPen) _GDIPlus_GraphicsFillPie($hGraphic, $ballpos1, $ballpos2, 150, 100, 0, -340,$hBrush2) _GDIPlus_GraphicsFillPie($hGraphic, $ballpos1,$ballpos2, 150, 100, 1, $pr,$hBrush) $hFont = _WinAPI_CreateFont(25, 0, 0, 0, 400, False, False, False, $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Arial') $hOldFont = _WinAPI_SelectObject($hDC, $hFont) _WinAPI_SetTextColor($hDC, 0x0000FF) _WinAPI_SetBkColor($hDC, 0x000000) ; comment next line to get black background instead of transparent one _WinAPI_SetBkMode($hDC, $TRANSPARENT) _WinAPI_DrawText($hDC, "Статистика на, " & "2009.03.29" & @CRLF & " "& @CRLF & "123 "& "руб." , $tRECT, $DT_LEFT) While 1 Sleep(40) WEnd _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_PenDispose($hPen) _GDIPlus_BrushDispose($vanish) Func _ende() _GDIPlus_Shutdown() Exit EndFunc ;==>_ende Func _WinAPI_SetLayeredWindowAttributes($hwnd, $i_transcolor, $Transparency = 255, $dwFlages = 0x03, $isColorRef = False) ; progandy If $dwFlages = Default Or $dwFlages = "" Or $dwFlages < 0 Then $dwFlages = 0x03 If Not $isColorRef Then $i_transcolor = Hex(String($i_transcolor), 6) $i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2)) EndIf Local $Ret = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $hwnd, "long", $i_transcolor, "byte", $Transparency, "long", $dwFlages) Select Case @error Return SetError(@error, 0, 0) Case $Ret[0] = 0 Return SetError(4, _WinAPI_GetLastError(), 0) Case Else Return 1 EndSelect EndFunc ;==>_WinAPI_SetLayeredWindowAttributes |