Search the Community
Showing results for tags 'lol'.
-
So, I was board What have I done? Well using a GUI and label controls I have made a bit of a rubbish time waster drawer script that lets you draw randomly coloured dots inside the black area by using your left mouse button. You can erase with the right mouse button. If you want to completely clear it you can press your middle mouse button (scroller wheel) Enjoy lol.... AutoItSetOption('MouseCoordMode', 2) Global $hBox[62][62], $hGUI, $iTest $iTest = 0 ; Set this to 1 to force random and automatic dot placement. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Misc.au3> $hDll = DllOpen('user32.dll') CreateTheGUI() While 1 $x = Floor(MouseGetPos(0) / 5) $y = Floor(MouseGetPos(1) / 5) If $iTest = 1 Then $x = Floor(Random(1, 300, 1) / 5) $y = Floor(Random(1, 300, 1) / 5) EndIf If $x >= 0 And $y >= 0 Then If $x <= 60 And $y <= 60 Then If _IsPressed('01', $hDll) Or $iTest = 1 Then If GUICtrlGetHandle($hBox[$x][$y]) = 0 Then $hBox[$x][$y] = GUICtrlCreateLabel("", $x * 5, $y * 5, 5, 5) GUICtrlSetBkColor($hBox[$x][$y], '0x' & Random(1, 16581375, 1)) EndIf If _IsPressed('02', $hDll) Then If GUICtrlGetHandle($hBox[$x][$y]) Then $hBox[$x][$y] = GUICtrlDelete($hBox[$x][$y]) EndIf If _IsPressed('04', $hDll) Then While _IsPressed('04', $hDll) Sleep(50) WEnd GUIDelete($hGUI) Global $hBox = 0 Sleep(50) Global $hBox[62][62] CreateTheGUI() Sleep(50) EndIf EndIf EndIf If GUIGetMsg() = $GUI_EVENT_CLOSE Then _Exit() Sleep(1) WEnd Func CreateTheGUI() $hGUI = GUICreate("", 300, 300, -1, -1) GUISetBkColor('0x000000') GUISetState(@SW_SHOW) EndFunc ;==>CreateTheGUI Func _Exit() DllClose($hDll) Exit EndFunc ;==>_Exit