Gianni Posted May 14, 2015 Share Posted May 14, 2015 (edited) ....from the serie "strange clocks":see here for infos on how to read this clockexpandcollapse popup; Berlin-Uhr HotKeySet("{Esc}", "End") Global $aColors[3] = ["0x757575", "0xFFCC00", "0xFF0033"] ; [off][yellow][red] Local $iSec = 0, $iMin = 0 Global $hGui = GUICreate(' Berlin-Uhr', 275, 240) ; ($nrPerLine, $ctrlWidth, $ctrlHeight, $xPanelPos, $yPanelPos, $xSpace) Local $aGuiSecsX2 = _GuiPanel(01, 55, 35, 115, 010, 5) ; Seconds blink Local $aGuiHourX5 = _GuiPanel(04, 55, 35, 025, 055, 5) ; Hours * 5 Local $aGuiHourX1 = _GuiPanel(04, 55, 35, 025, 100, 5) ; Hours Local $aGuiMinsX5 = _GuiPanel(11, 16, 35, 025, 145, 6) ; Mins * 5 Local $aGuiMinsX1 = _GuiPanel(04, 55, 35, 025, 190, 5) ; Mins GUISetBkColor("0x9A9A9A", $hGui) GUISetState(@SW_SHOW) Do If @SEC <> $iSec Then ; when the second changes do what following $iSec = @SEC GUICtrlSetBkColor($aGuiSecsX2[1], $aColors[@SEC / 2 = Int(@SEC / 2)]) ; second blink If @MIN <> $iMin Then $iMin = @MIN For $i = 1 To 11 If $i < 5 Then GUICtrlSetBkColor($aGuiHourX5[$i], $aColors[2 * (Int(@HOUR / 5) >= $i)]) GUICtrlSetBkColor($aGuiHourX1[$i], $aColors[2 * (Mod(@HOUR, 5) >= $i)]) GUICtrlSetBkColor($aGuiMinsX1[$i], $aColors[Mod(@MIN, 5) >= $i]) EndIf GUICtrlSetBkColor($aGuiMinsX5[$i], $aColors[(Int(@MIN / 5) >= $i) * (1 + ($i = 3 Or $i = 6 Or $i = 9))]) Next EndIf EndIf Until GUIGetMsg() = -3 ; $GUI_EVENT_CLOSE End() Func _GuiPanel($nrPerLine, $ctrlWidth, $ctrlHeight, $xPanelPos, $yPanelPos, $xSpace = 1) ; create the controls Local $aGuiGridCtrls[$nrPerLine + 1] For $i = 1 To $nrPerLine $left = $xPanelPos + ((($ctrlWidth + $xSpace) * ($i - 1)) - $xSpace) $aGuiGridCtrls[$i] = GUICtrlCreateInput("", $left, $yPanelPos, $ctrlWidth, $ctrlHeight, 0x0800) ; 0x0800 = $ES_READONLY GUICtrlSetBkColor(-1, $aColors[0]) Next Return $aGuiGridCtrls EndFunc ;==>_GuiPanel Func End() If WinActive($hGui) Then GUIDelete($hGui) Exit EndIf EndFunc ;==>End Edited May 20, 2015 by Chimp argumentum 1 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
lorenkinzel Posted May 14, 2015 Share Posted May 14, 2015 Every bit as cool & fun as the Fibonacci clock.Much like that one, I'm not sure if I could deal with it at 5:00 A.M.Still a neat toy! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 14, 2015 Moderators Share Posted May 14, 2015 Chimp,Nice clock.Sticking with the "mad clock" theme, we had fun with Qlock some years ago.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Gianni Posted May 17, 2015 Author Share Posted May 17, 2015 @lorenkinzelthanks@melba23that Qlock is very nice! thanks for the link Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
GreenCan Posted May 18, 2015 Share Posted May 18, 2015 Nice clock Chimp, by the time I have calculated what time it is, we are already 2 minutes later I like it, makes my brain work...Small suggestion, I would replace GUICtrlCreateInput by GUICtrlCreateLabel to avoid the blinking cursor in the first box.GreenCan trancexx 1 Contributions CheckUpdate - SelfUpdating script ------- Self updating script Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple MsgBox with CountDown ------------------- MsgBox with visual countdown Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV) USB Drive Tools ------------------------------ Tool to help you with your USB drive management Input Period udf ------------------------------ GUI for a period input Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette Excel Chart UDF ----------------------------- Collaboration project with water GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm TaskListAllDetailed --------------------------- List All Scheduled Tasks Computer Info --------------------------------- A collection of information for helpdesk Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only) Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane Oracle SQL Report Generator ------------- Oracle Report generator using SQL SQLite Report Generator ------------------- SQLite Report generator using SQL SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access Animated animals ----------------------------- Fun: Moving animated objects Perforated image in GUI --------------------- Fun: Perforate your image with image objects UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool Visual Image effect (GUI) -------------------- Visually apply effects on an image Link to comment Share on other sites More sharing options...
Gianni Posted May 18, 2015 Author Share Posted May 18, 2015 .... by the time I have calculated what time it is, we are already 2 minutes later ...Ha..lol.... you are right Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now