#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
#include <WinAPIEx.au3>
#include <EditConstants.au3>
#include <BigNum.au3>
#include <Date.au3>
Global $sButton
Global $bButton
Global $nCheck ; часики
Global $Per = 0
Global $pPer
Global $iStartX
Global $iEndX
Global $pPerx1 = 33
Global $pPerx2 = 37
Global $Lpxx = 98
Global $Lpyy = 791
Global $iStartY = 105
Global $iEndY = 105
Global $Lpx = 105 ; полоса у
Global $Lpy = 38 ; полоса х
$Form1 = GUICreate("Form1", 839, 630, 365, 190, $WS_EX_TOOLWINDOW)
GUISetBkColor(0x808080)
$Label1 = GUICtrlCreateLabel(" ", 8, 8, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label2 = GUICtrlCreateLabel(" ", 8, 12, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label3 = GUICtrlCreateLabel(" ", 8, 16, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label4 = GUICtrlCreateLabel(" ", 8, 20, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label5 = GUICtrlCreateLabel(" ", 8, 24, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label6 = GUICtrlCreateLabel(" ", 8, 28, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label7 = GUICtrlCreateLabel(" ", 8, 32, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label8 = GUICtrlCreateLabel(" ", 8, 36, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label9 = GUICtrlCreateLabel(" ", 8, 40, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label10 = GUICtrlCreateLabel(" ", 8, 44, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label11 = GUICtrlCreateLabel(" ", 8, 48, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label12 = GUICtrlCreateLabel(" ", 8, 52, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label13 = GUICtrlCreateLabel(" ", 8, 56, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label14 = GUICtrlCreateLabel(" ", 8, 60, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label15 = GUICtrlCreateLabel(" ", 8, 64, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label16 = GUICtrlCreateLabel(" ", 8, 68, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label17 = GUICtrlCreateLabel(" ", 8, 72, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label18 = GUICtrlCreateLabel(" ", 8, 76, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label19 = GUICtrlCreateLabel(" ", 8, 80, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label20 = GUICtrlCreateLabel(" ", 8, 84, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label21 = GUICtrlCreateLabel(" ", 8, 88, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label22 = GUICtrlCreateLabel(" ", 8, 92, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label23 = GUICtrlCreateLabel(" ", 8, 96, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label24 = GUICtrlCreateLabel(" ", 8, 100, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label25 = GUICtrlCreateLabel(" ", 8, 104, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label26 = GUICtrlCreateLabel(" ", 8, 108, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label27 = GUICtrlCreateLabel(" ", 8, 112, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label28 = GUICtrlCreateLabel(" ", 8, 116, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label29 = GUICtrlCreateLabel(" ", 8, 120, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label30 = GUICtrlCreateLabel(" ", 8, 124, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label31 = GUICtrlCreateLabel(" ", 8, 128, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label32 = GUICtrlCreateLabel(" ", 8, 132, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label33 = GUICtrlCreateLabel(" ", 8, 136, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label34 = GUICtrlCreateLabel(" ", 8, 140, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label35 = GUICtrlCreateLabel(" ", 8, 144, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label36 = GUICtrlCreateLabel(" ", 8, 148, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label37 = GUICtrlCreateLabel(" ", 8, 152, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label38 = GUICtrlCreateLabel(" ", 8, 156, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label39 = GUICtrlCreateLabel(" ", 8, 160, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label40 = GUICtrlCreateLabel(" ", 8, 164, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label41 = GUICtrlCreateLabel(" ", 8, 168, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label42 = GUICtrlCreateLabel(" ", 8, 172, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label43 = GUICtrlCreateLabel(" ", 8, 176, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label44 = GUICtrlCreateLabel(" ", 8, 180, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label45 = GUICtrlCreateLabel(" ", 8, 184, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label46 = GUICtrlCreateLabel(" ", 8, 188, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label47 = GUICtrlCreateLabel(" ", 8, 192, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label48 = GUICtrlCreateLabel(" ", 8, 196, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label49 = GUICtrlCreateLabel(" ", 8, 200, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label50 = GUICtrlCreateLabel(" ", 8, 204, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Label0 = GUICtrlCreateLabel(" ", 8, 208, 21, 3) ; --- $Label0 --- Ноль ====================
GUICtrlSetBkColor(-1, 0x1F75FE)
$2Label1 = GUICtrlCreateLabel(" ", 8, 212, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label2 = GUICtrlCreateLabel(" ", 8, 216, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label3 = GUICtrlCreateLabel(" ", 8, 220, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label4 = GUICtrlCreateLabel(" ", 8, 224, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label5 = GUICtrlCreateLabel(" ", 8, 228, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label6 = GUICtrlCreateLabel(" ", 8, 232, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label7 = GUICtrlCreateLabel(" ", 8, 236, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label8 = GUICtrlCreateLabel(" ", 8, 240, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label9 = GUICtrlCreateLabel(" ", 8, 244, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label10 = GUICtrlCreateLabel(" ", 8, 248, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label11 = GUICtrlCreateLabel(" ", 8, 252, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label12 = GUICtrlCreateLabel(" ", 8, 256, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label13 = GUICtrlCreateLabel(" ", 8, 260, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label14 = GUICtrlCreateLabel(" ", 8, 264, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label15 = GUICtrlCreateLabel(" ", 8, 268, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label16 = GUICtrlCreateLabel(" ", 8, 272, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label17 = GUICtrlCreateLabel(" ", 8, 276, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label18 = GUICtrlCreateLabel(" ", 8, 280, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label19 = GUICtrlCreateLabel(" ", 8, 284, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label20 = GUICtrlCreateLabel(" ", 8, 288, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label21 = GUICtrlCreateLabel(" ", 8, 292, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label22 = GUICtrlCreateLabel(" ", 8, 296, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label23 = GUICtrlCreateLabel(" ", 8, 300, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label24 = GUICtrlCreateLabel(" ", 8, 304, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label25 = GUICtrlCreateLabel(" ", 8, 308, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label26 = GUICtrlCreateLabel(" ", 8, 312, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label27 = GUICtrlCreateLabel(" ", 8, 316, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label28 = GUICtrlCreateLabel(" ", 8, 320, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label29 = GUICtrlCreateLabel(" ", 8, 324, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label30 = GUICtrlCreateLabel(" ", 8, 328, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label31 = GUICtrlCreateLabel(" ", 8, 332, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label32 = GUICtrlCreateLabel(" ", 8, 336, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label33 = GUICtrlCreateLabel(" ", 8, 340, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label34 = GUICtrlCreateLabel(" ", 8, 344, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label35 = GUICtrlCreateLabel(" ", 8, 348, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label36 = GUICtrlCreateLabel(" ", 8, 352, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label37 = GUICtrlCreateLabel(" ", 8, 356, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label38 = GUICtrlCreateLabel(" ", 8, 360, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label39 = GUICtrlCreateLabel(" ", 8, 364, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label40 = GUICtrlCreateLabel(" ", 8, 368, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label41 = GUICtrlCreateLabel(" ", 8, 372, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label42 = GUICtrlCreateLabel(" ", 8, 376, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label43 = GUICtrlCreateLabel(" ", 8, 380, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label44 = GUICtrlCreateLabel(" ", 8, 384, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label45 = GUICtrlCreateLabel(" ", 8, 388, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label46 = GUICtrlCreateLabel(" ", 8, 392, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label47 = GUICtrlCreateLabel(" ", 8, 396, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label48 = GUICtrlCreateLabel(" ", 8, 400, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label49 = GUICtrlCreateLabel(" ", 8, 404, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$2Label50 = GUICtrlCreateLabel(" ", 8, 408, 21, 3)
GUICtrlSetBkColor(-1, 0x000000)
$Button1 = GUICtrlCreateButton(" ",37, 218, 155, 33, $WS_BORDER, $WS_EX_STATICEDGE)
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton(" ",37, 256, 155, 33, $WS_BORDER, $WS_EX_STATICEDGE)
GUICtrlSetCursor (-1, 0)
$hLabel = GuiCtrlCreateLabel( '', 800, 570, 31, 29)
GUICtrlSetColor(106, 0x191970)
$Grafic = GUICtrlCreateLabel(" ", 31, 3, 761, 207,$WS_BORDER,$WS_EX_STATICEDGE)
GUICtrlSetBkColor(-1, 0x000000)
$PolosaProcent = GUICtrlCreateLabel(" ", 38, 105, 797, 1,$WS_BORDER)
$Procent = GUICtrlCreateLabel(".00%", 791, 98, 38, 16,BitOR($SS_CENTERIMAGE,$SS_RIGHT,$WS_BORDER))
GUICtrlSetBkColor(-1, 0xA0A0A4)
GUICtrlSetColor(-1, 0x191970)
$hLabel = GuiCtrlCreateLabel( '', 762, 577, 77, 18)
GUICtrlSetColor(106, 0x191970)
GUISetState(@SW_SHOW,$Form1)
AdlibRegister('ran',Random(5911,6000))
AdlibRegister('_Main', 60000)
AdlibRegister('Line', 6000)
;==============================================================================
_GDIPlus_Startup()
Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form1) ; Создаёт графический объект из дескриптора окна
Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics(800, 212, $hGraphic) ;Создает объект Bitmap на основе графического объекта, с указанием ширины и высоты
Global $hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap) ; Возвращает графический контекст изображения
Global $hPenBlueThin = _GDIPlus_PenCreate(0xFF33CCFF,2) ; перо для синей линии
_GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 0) ; Задает качество визуализации графического объекта
GUIRegisterMsg($WM_ERASEBKGND, 'WM_ERASEBKGND')
;===============================================================================
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_GDIPlus_PenDispose($hPenBlueThin) ; удаление ресурсов
_GDIPlus_GraphicsDispose($hGraphic) ; удаление ресурсов
_GDIPlus_BitmapDispose($hBitmap) ; удаление ресурсов
_GDIPlus_GraphicsDispose($hBackbuffer) ; удаление ресурсов
_GDIPlus_Shutdown() ; удаление ресурсов
Exit
EndSwitch
time()
WEnd
;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Func _Main()
Local $tTime, $aTime
; Получение текущего системного времени
$tTime = _Date_Time_GetSystemTime()
$aTime = _Date_Time_SystemTimeToArray($tTime)
Select
Case $aTime[4] = 0
pPerx()
Case $aTime[4] = 12
pPerx()
Case $aTime[4] = 24
pPerx()
Case $aTime[4] = 36
pPerx()
Case $aTime[4] = 48
pPerx()
EndSelect
EndFunc
;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Func ran()
$pPer = Random(-3, 3, 1)
EndFunc
;-----------------------------------------------------------------------------------------
;---------------------------------------------------------------------------------------
Func time()
If @SEC <> $nCheck Then
GUICtrlSetData($hLabel, " " & @HOUR & ":" & @MIN & ":" & @SEC )
GUICtrlSetFont(-1, 10, 600, 0, "Tahoma")
$nCheck = @SEC
EndIf
EndFunc
;----------------------------------------------------------------------------------------------
Func pPerx()
$pPerx1 += 6
$pPerx2 += 6
$Lpy += 6
EndFunc
Func Line()
Select
Case $Per <-100
$Per += 5
$iStartY += 5
$iEndY += 5
$Lpx += 5
$Lpxx -= 5
Case $Per > 100
$iStartY -= 5
$iEndY -= 5
$Per -= 5
$Lpx -= 5
$Lpxx -= 5
EndSelect
$Per =_BigNum_Add($Per, $pPer)
$iStartX = $pPerx1
$iStartY += $pPer
$iEndX = $pPerx2
$iEndY += $pPer
$Lpx += $pPer
$Lpxx += $pPer
Lp00()
grss($iStartX, $iStartY, $iEndX, $iEndY)
EndFunc
Func Lp00()
Local $PR
$PR &= $Per
$PR &=' %'
GUICtrlDelete($PolosaProcent)
$PolosaProcent = GUICtrlCreateLabel(" ", $Lpy, $Lpx, 797, 1)
GUICtrlSetBkColor(-1,0x800000)
GUICtrlDelete($Procent)
$Procent = GUICtrlCreateLabel($PR, $Lpyy, $Lpxx, 38, 16,BitOR($SS_CENTERIMAGE,$WS_BORDER,$SS_RIGHT))
GUICtrlSetBkColor(-1, 0xA0A0A4)
GUICtrlSetFont(-1, 9, 570, 1, "Tahoma")
GUICtrlSetColor(-1, 0x191970)
EndFunc
;=======================================================================================================================
Func grss($iStartX, $iStartY, $iEndX, $iEndY)
_GDIPlus_GraphicsDrawLine($hBackbuffer, $iStartX, $iStartY, $iEndX, $iEndY, $hPenBlueThin) ; рисует линию отрезка
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, 800, 212)
EndFunc
Func WM_ERASEBKGND()
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, 800, 212)
EndFunc
;-------------------------------------------------------------------------------------------------------------------