Sign in to follow this  
Followers 0
Achilles

Binary Clock

22 posts in this topic

#1 ·  Posted (edited)

Updated!

Features

- Awesome GUI :) A picture for the background is attached: Clock_Background.bmp

- Shows the time

- Click anywhere on the window and you drag it do where you want (it also snaps to the side)

- Double click when it's snapped and it will hide (just shows enough for you double click to bring it out again)

FYI: For those of you who follow my Desktops program, I have made a floating toolbar very similar to this for switching between desktops.

This now uses an #Include file I wrote that is attached you can download here: Toolbar.au3

Or you can copy the code and make it yourself, make sure you name it Toolbar.au3 if you do!

Suggestions/bugs/comments/et cetera welcome!

#region ###VariablesS & Include & Opts###
#Include <Constants.au3>
#include 'Toolbar.au3'
Opt('TrayOnEventMode',1)
Opt('TrayMenuMode',1)
Global Const $SIZE = 18 ;The size of each square
Global Const $COLOR = 14090240 ;Red
Global $hour = @HOUR 
Global $min = @MIN 
Global $sec = @SEC
Dim $binarySpaces[6][4][2]
#endRegion
#region ###Create GUI & Tray###
$gui = GuiCreate('Clock', 134, 94, -1, -1, BitOR($WS_SYSMENU, $WS_POPUP), BitOr($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
$background = GuiCtrlCreatePic(@ScriptDir & '\Clock Background.bmp', 0, 0, 134, 94)
    GuiCtrlSetOnEvent(-1, '_Toolbar_Handler')

_Setup_ToolBar($gui, 300, 30) 
_Add_Control($background)

$binarySpaces[0][0][0] = GuiCtrlCreateLabel('', 8, 68, $SIZE, $SIZE, $SS_SUNKEN)
    GuiCtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$binarySpaces[0][1][0] = GuiCtrlCreateLabel('', 8, 48, $SIZE, $SIZE, $SS_SUNKEN)
    GuiCtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

$x = 8
For $a = 2 to 4 Step 2
    $y = 68
    For $b = 0 to 2 
        $binarySpaces[$a][$b][0] = GuiCtrlCreateLabel('', $x + 40, $y, $SIZE, $SIZE, $SS_SUNKEN)
            GuiCtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
        $y -= 20        
    Next 
    $x += 40
Next 

$x = 28
For $a = 1 to 5 Step 2
    $y = 68
    For $b = 0 to 3
        $binarySpaces[$a][$b][0] =  GuiCtrlCreateLabel('', $x, $y, $SIZE, $SIZE, $SS_SUNKEN)
            GuiCtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
        $y -= 20
    Next
    $x += 40
Next 

TrayCreateItem('Exit Binary Clock') 
    TrayItemSetOnEvent(-1, '_Exit')
    TrayItemSetState(-1, $TRAY_DEFAULT)
#endRegion
#region ### Startup ###
_SetHour() 
_SetMin() 
_SetSec()
GuiSetState() 
#endRegion
#region ### Loop ###
While 1 
    _UpdateBinaryClock() 
    Sleep(200)
WEnd
#endRegion
#region ### Functions ###
Func _UpdateBinaryClock() 
    If $hour <> @HOUR then _SetHour()
    If $min <> @MIN then _SetMin()
    If $sec <> @SEC then _SetSec()
EndFunc

Func _SetHour()
    $hourSplit = StringSplit(@HOUR, '')
    _Check(0,1)
    _SetColumn(0, $hourSplit[1])
    _SetColumn(1, $hourSplit[2])
    $hour = @HOUR
EndFunc 
    
Func _SetMin() 
    $minSplit = StringSplit(@MIN, '')
    _Check(2,3)
    _SetColumn(2, $minSplit[1]) 
    _SetColumn(3, $minSplit[2])
    $min = @MIN
EndFunc 

Func _SetSec() 
    $secSplit = StringSplit(@SEC, '')
    _Check(4,5)
    _SetColumn(4, $secSplit[1]) 
    _SetColumn(5, $secSplit[2])
    $sec = @SEC
EndFunc

Func _Check($start, $finsih)
    For $a = $start to $finsih 
        For $b = 0 to 3 
            If $binarySpaces[$a][$b][1] = True then 
                GuiCtrlSetBkColor($binarySpaces[$a][$b][0], $GUI_BKCOLOR_TRANSPARENT)
                $binarySpaces[$a][$b][1] = False
            EndIf 
        Next 
    Next
EndFunc

Func _SetColumn($column, $value)
    Switch $value 
        Case '1' 
            GuiCtrlSetBkColor($binarySpaces[$column][0][0], $COLOR)
            $binarySpaces[$column][0][1] = True
        Case '2' 
            GuiCtrlSetBkColor($binarySpaces[$column][1][0], $COLOR)
            $binarySpaces[$column][1][1] = True
        Case '3' 
            GuiCtrlSetBkColor($binarySpaces[$column][0][0], $COLOR)
            GuiCtrlSetBkColor($binarySpaces[$column][1][0], $COLOR)
            $binarySpaces[$column][0][1] = True
            $binarySpaces[$column][1][1] = True
        Case '4' 
            GuiCtrlSetBkColor($binarySpaces[$column][2][0], $COLOR)
            $binarySpaces[$column][2][1] = True
        Case '5' 
            GuiCtrlSetBkColor($binarySpaces[$column][0][0], $COLOR)
            GuiCtrlSetBkColor($binarySpaces[$column][2][0], $COLOR)
            $binarySpaces[$column][0][1] = True
            $binarySpaces[$column][2][1] = True
        Case '6' 
            GuiCtrlSetBkColor($binarySpaces[$column][1][0], $COLOR)
            GuiCtrlSetBkColor($binarySpaces[$column][2][0], $COLOR)
            $binarySpaces[$column][1][1] = True
            $binarySpaces[$column][2][1] = True
        Case '7' 
            GuiCtrlSetBkColor($binarySpaces[$column][0][0], $COLOR)
            GuiCtrlSetBkColor($binarySpaces[$column][1][0], $COLOR)
            GuiCtrlSetBkColor($binarySpaces[$column][2][0], $COLOR)
            $binarySpaces[$column][0][1] = True
            $binarySpaces[$column][1][1] = True
            $binarySpaces[$column][2][1] = True
        Case '8' 
            GuiCtrlSetBkColor($binarySpaces[$column][3][0], $COLOR)
            $binarySpaces[$column][3][1] = True
        Case '9'
            GuiCtrlSetBkColor($binarySpaces[$column][0][0], $COLOR)
            GuiCtrlSetBkColor($binarySpaces[$column][3][0], $COLOR)
            $binarySpaces[$column][0][1] = True
            $binarySpaces[$column][3][1] = True
    EndSwitch
EndFunc

Func _Exit() 
    Exit 
EndFunc
#endRegionoÝ÷ Øw«z+-çâ쨺wvÚ"Énu殶­sb4æ6ÇVFRÖöæ6P¢6æ6ÇVFRfÇC´uT6öç7FçG2æS2fwC° ¤÷BgV÷C´uTöäWfVçDÖöFRgV÷C²Â ¤Æö6Â6öç7Bb33c´FV'VtBÒµW6VBf÷"FRF÷V&ÆR6Æ6°¤Æö6Â6öç7Bb33cµ5DåôD$Ä4IJҵW6VBf÷"FRF÷V&ÆR6Æ6°¤Æö6Âb33c·FööÆ&%õ7VVBµFR7VVBBv6FRuTFW2æB6÷w0¤Æö6Âb33c·FööÆ&%õ6æµFRF7Fæ6R&WGvVVâFRVFvRæBFRvæF÷r&Vf÷&RFRvæF÷r6æ2FòFR6FP¤Æö6Âb33c·FööÆ&%õvæF÷rµFRæFÆRöbFRvæF÷rFæ²æFÆR2FR&vBFW&ФÆö6Âb33c·FööÆ&%ôFRÒfÇ6P¤Æö6Âb33c·FööÆ&%õ6æVBÒfÇ6P¤Æö6Âb33c·FööÆ&%ôÖ÷W6U÷0¤Æö6Âb33c·FööÆ&%ôöÆDÖ÷W6U÷5³%ÒÒ²ÓÂÓФÆö6Âb33c·FööÆ&%ôG&t6öçG&öÇ5³Ð ¤Æö6Âb33c·FööÆ&%ôÖ÷fæu³%ÒÒ´fÇ6RÂfÇ6UÐ £´gVæ2õ6WGWõFööÆ&"Ò'æõôÖࣰb33c·væF÷tæFÆRÒFRæFÆRöbFRvæF÷r£°b33c·7VVBÒFR7VVBBv6FRvæF÷rFW2÷6÷w2£°b33c·6æÒFR6æF7Fæ6P¤gVæ2õ6WGWõFööÄ&"b33c·væF÷tæFÆRÂb33c·7VVBÒSÂb33c·6æÒ b33c·FööÆ&%õvæF÷rÒb33c·væF÷tæFÆP b33c·FööÆ&%õ7VVBÒb33c·7VV@ b33c·FööÆ&%õ6æÒb33c·6æ uT&Vv7FW$×6rÂb33´ÕõtÕô4ôÔÔäBb33²¤VæDgVæ2 ¤gVæ2ôFEô6öçG&öÂb33c¶7G& &TFÒb33c·FööÆ&%ôG&t6öçG&öÇ5µT&÷VæBb33c·FööÆ&%ôG&t6öçG&öÇ2²Ð b33c·FööÆ&%ôG&t6öçG&öÇ5µT&÷VæBb33c·FööÆ&%ôG&t6öçG&öÇ2ÒÒÒb33c¶7G&À¤VæDgVæ2 ¤gVæ2õFööÆ&%ôæFÆW" bb33c·FööÆ&%ôFRÒfÇ6RFVâ bb33c·FööÆ&%ôÖ÷fæu³ÒÒG'VRFVà DÆ$F6&ÆR VÇ6P ÷Bb33´Ö÷W6T6ö÷&DÖöFRb33²Â b33c·FööÆ&%ôÖ÷W6U÷2ÒÖ÷W6TvWE÷2 ÷Bb33´Ö÷W6T6ö÷&DÖöFRb33²Â DÆ$Væ&ÆRb33µõvåG&vF6æb33²Â# VæD` b33c·FööÆ&%ôÖ÷fæu³ÓÒæ÷Bb33c·FööÆ&%ôÖ÷fæu³Ð VÇ6P bb33c·FööÆ&%ôÖ÷fæu³ÒÒG'VRFVâ DÆ$F6&ÆR VÇ6R ÷Bb33´Ö÷W6T6ö÷&DÖöFRb33²Â b33c·FööÆ&%ôÖ÷W6U÷2ÒÖ÷W6TvWE÷2 ÷Bb33´Ö÷W6T6ö÷&DÖöFRb33²Â DÆ$Væ&ÆRb33µôÖ÷fU6FUvæF÷rb33²Â# VæDb b33c·FööÆ&%ôÖ÷fæu³ÓÒæ÷Bb33c·FööÆ&%ôÖ÷fæu³Ð VæD`¤VæDgVæ2 ¤gVæ2ÕõtÕô4ôÔÔäBb33c¶væBÂb33c¶×6rÂb33c·u&ÒÂb33c¶Å&Ò Æö6Âb33c¶äæ÷Fg6öFRÒ&E6gBb33c·u&ÒÂb Æö6Âb33c¶äBÒ&DäBb33c·u&ÒÂdddb¢Æö6Âb33c¶7G&ÂÒb33c¶Å&Ð  bb33c·FööÆ&%õ6æVBfwC²FVà b33c·72ÒfÇ6P f÷"b33c¶ÒFòT&÷VæBb33c·FööÆ&%ôG&t6öçG&öÇ2Ò bb33c¶äBÒb33c·FööÆ&%ôG&t6öçG&öÇ5²b33c¶ÒFVâ b33c·72ÒG'VP VæD` æWB bb33c·72ÒfÇ6RFVâ &WGW&à VÇ6P bb33c¶äæ÷Fg6öFRÒb33cµ5DåôD$Ä4IJFVâ DÆ$F6&ÆR bb33c·FööÆ&%ôFRÒG'VRFVâ õ6÷uFööÆ&" b33c·FööÆ&%ôÖ÷fæu³ÒÒfÇ6P VÇ6R ôFUFööÆ&" b33c·FööÆ&%ôÖ÷fæu³ÒÒfÇ6P VæD` b33c·FööÆ&%ôFRÒæ÷Bb33c·FööÆ&%ôFP &WGW&à VæDb VæD` VæD` ¢&WGW&âb33c´uTõ%TäDTdÕ4p¤VæDgVæ0 ¤gVæ2õvåG&vF6æ¢b33c·÷2ÒÖ÷W6TvWE÷2 bb33c·÷5³ÒÒb33c·FööÆ&%ôöÆDÖ÷W6U÷5³ÒæBb33c·÷5³ÒÒb33c·FööÆ&%ôöÆDÖ÷W6U÷5³ÒFVâ&WGW&à  b33c·vå÷2ÒvävWE÷2b33c·FööÆ&%õvæF÷r b33c·FööÆ&%õ6æVBÒ bW'&÷"ÒFVâ&WGW&à ¢bb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³ÒfÇC²b33c·FööÆ&%õ6æFVà¢b33c·Ò b33c·FööÆ&%õ6æVB³Ò¢VÇ6Tbb33c·vå÷5³%ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³Ò²b33c·÷5³ÒfwC²FW6·F÷vGFÒb33c·FööÆ&%õ6æFVà¢b33c·ÒFW6·F÷vGFÒb33c·vå÷5³%Ð b33c·FööÆ&%õ6æVB³Ò0¢VÇ6P¢b33c·Òb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³Ð¢VæD` ¢bb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³ÒfÇC²b33c·FööÆ&%õ6æFVà¢b33c·Ò b33c·FööÆ&%õ6æVB³Ò¢VÇ6Tbb33c·vå÷5³5ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³Ò²b33c·÷5³ÒfwC²FW6·F÷VvBÒb33c·FööÆ&%õ6æFVà¢b33c·ÒFW6·F÷VvBÒb33c·vå÷5³5Ð b33c·FööÆ&%õ6æVB³ÒP¢VÇ6P¢b33c·Òb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³Ð¢VæD`  bb33c·FööÆ&%õ6æVBÒ÷"b33c·FööÆ&6æVBÒ÷"b33c·FööÆ&%õ6æVBÒbFVâb33c·FööÆ&%õ6æVBÒ bb33c·FööÆ&%õ6æVBÒ2÷"b33c·FööÆ&6æVBÒ2÷"b33c·FööÆ&%õ6æVBÒFVâb33c·FööÆ&%õ6æVBÒ0  bb33c·FööÆ&%õ6æVBÒFVâb33c·FööÆ&%õ6æVBÒ  bb33c·FööÆ&%õ6æVBÒRFVâb33c·FööÆ&%õ6æVBÒ@ ¢väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²Âb33c·Âb33c· b33c·FööÆ&%ôöÆDÖ÷W6U÷2Òb33c·÷0 ¤VæDgVæ0 ¤gVæ2ôÖ÷fU6FUvæF÷r¢b33c·÷2ÒÖ÷W6TvWE÷2 bb33c·÷5³ÒÒb33c·FööÆ&%ôöÆDÖ÷W6U÷5³ÒæBb33c·÷5³ÒÒb33c·FööÆ&%ôöÆDÖ÷W6U÷5³ÒFVâ&WGW&à ¢b33c·vå÷2ÒvävWE÷2b33c·FööÆ&%õvæF÷r bW'&÷"ÒFVâ&WGW&à  bb33c·FööÆ&6æVBÒ"÷"b33c·FööÆ&6æVBÒBFVâ bb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³ÒfÇC²FVâ b33c·Ò VÇ6Tbb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³ÒfwC²FW6·F÷vGFÒb33c·vå÷5³%ÒFVâ b33c·ÒFW6·F÷vGFÒb33c·vå÷5³%Ò VÇ6P b33c·Òb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³Ð VæD` väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²Âb33c·Âb33c·vå÷5³Ò VÇ6P bb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³ÒfÇC²FVâ b33c·Ò VÇ6Tbb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³ÒfwC²FW6·F÷VvBÒb33c·vå÷5³5ÒFVâ b33c·ÒFW6·F÷VvBÒb33c·vå÷5³5Ò VÇ6R b33c·Òb33c·÷5³ÒÒb33c·FööÆ&%ôÖ÷W6U÷5³Ð VæDb väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²Âb33c·vå÷5³ÒÂb33c· VæDb  b33c·FööÆ&%ôöÆDÖ÷W6U÷2Òb33c·÷0¤VæDgVæ0 ¤gVæ2õ6÷uFööÆ&" b33c·÷6FöâÒvävWE÷2b33c·FööÆ&%õvæF÷r 7vF6b33c·FööÆ&%õ6æV@ 66R FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂS"·6ÆFR÷WBFòÆVg@ väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²Âb33c·÷6Föå³Ò²b33c·÷6Föå³%ÒÒbÂb33c·÷6Föå³Ò FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂC·6ÆFRâg&öÒÆVg@ 66R  FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂS·6ÆFRÖ÷WBFòF÷ väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²Âb33c·÷6Föå³ÒÂb33c·÷6Föå³Ò²b33c·÷6Föå³5ÒÒb FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂCB·6ÆFRÖâg&öÒF÷ 66R0 FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂS·6ÆFR÷WBFò&v@ väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²ÂFW6·F÷vGFÒb33c·÷6Föå³%ÒÂb33c·÷6Föå³Ò FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂC"·6ÆFRâg&öÒ&v@ 66R@ FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂSB·6ÆFRÖ÷WBFò&÷GFöÐ väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²Âb33c·÷6Föå³ÒÂFW6·F÷VvBÒb33c·÷6Föå³5Ò FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂC·6ÆFRÖâg&öÒ&÷GFöÐ VæE7vF6¤VæDgVæ2 ¤gVæ2ôFUFööÆ&" b33c·÷6FöâÒvävWE÷2b33c·FööÆ&%õvæF÷r 7vF6b33c·FööÆ&6æV@ 66R FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂS"·6ÆFR÷WBFòÆVg@ väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²ÂbÒb33c·÷6Föå³%ÒÂb33c·÷6Föå³Ò FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂC·6ÆFRâg&öÒÆVg@ 66R  FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂS·6ÆFRÖ÷WBFòF÷ väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²Âb33c·÷6Föå³ÒÂbÒb33c·÷6Föå³5Ò FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂCB·6ÆFRÖâg&öÒF÷ 66R0 FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂS·6ÆFR÷WBFò&v@ väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²ÂFW6·F÷vGFÒbÂb33c·÷6Föå³Ò FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂC"·6ÆFRâg&öÒ&v@ 66R@ FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂSB·6ÆFRÖ÷WBFò&÷GFöÐ väÖ÷fRb33c·FööÆ&%õvæF÷rÂb33²b33²Âb33c·÷6Föå³ÒÂFW6·F÷VvBÒb FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33c·FööÆ&%õvæF÷rÂgV÷C¶çBgV÷C²Âb33c·FööÆ&%õ7VVBÂgV÷C¶ÆöærgV÷C²ÂC·6ÆFRÖâg&öÒ&÷GFöÐ VæE7vF6¤VæDgVæ
Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites



Sweet job, i like it!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Haha great one! Love it :)

Edited by Pakku

Share this post


Link to post
Share on other sites

I'm rather confused as to where your binary representation came from. I was watching the right hand row and noticed that it updated incorrectly. I saw:

0000 0001

0000 0010

0000 0011

0000 0100

0000 0101

0000 0111

0000 1000

0000 1001

0001 0000 <<< should be 0000 1010

Why does that happen?

Share this post


Link to post
Share on other sites

0000 1001

0001 0000 <<< should be 0000 1010

Why does that happen?

Binary clocks tend to represent each of the 6 digits seen on a normal digital clock (12:34:56 = hh:mm:ss), so the 6 columns seen in the GUI are those 6 digits - so the 0000 1001 literally translates to: 0 9 after which of couse comes 1 0 represented by 0001 0000

See it?

check wikipedia for a diagram of how to read it :-)


"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Thanks for the comments! I'm going to make some changed to the GUI right now so that should be updated in half an hour or so, I'll post when I do...

@Manadar

How 'bout a 7 segment decoder?

No idea what that means... What is it?

@james3mg

check wikipedia for a diagram of how to read it :-)

That's how I learned how to use a binary clock :)

@Toady, Paulie and arjan staring

Thanks for the compliments!

Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

@Manadar

No idea what that means... What is it?

A 7 segment decoder takes a binary signal and converts it to an output that could be used by a 7 segment display. An 8 has seven sides to it, that's why it's called a 7 segment decoder.

Put a binary value of 0000 in the decoder and what comes out is 1111110. Leaving only the middle segment out. Enter a value of 1000 (8) and you get 1111111.

On this page there is a bit more information on the 7 segment decoder. Only look at the Truth table.

Edited by Manadar

Share this post


Link to post
Share on other sites

Can't move it around at all...is this a Vista problem?


"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110

Share this post


Link to post
Share on other sites

Can't move it around at all...is this a Vista problem?

Are you using the picture? I don't think it will move if you don't have the picture...

But if it's a Vista problem, I wouldn't know... I have XP...


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

If wast working on my machine too. The line..

$background = GUICtrlCreatePic(@ScriptDir & '\Clock Background.bmp', 0, 0, 134, 94)
oÝ÷ Ù(hºW[zëw­©î׫±Ê+z«¨¶«¨¶)íàL=ø¥zv¦y«­¢+Ø(ÀÌØí­É½Õ¹ôU%
Ñɱ
ÉÑA¥¡MÉ¥ÁѥȵÀìÌäìÀäÈí
±½­} ­É½Õ¹¹µÀÌäì°À°À°ÄÌаäФ(

This made it work.

Edited by Toady

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

If wast working on my machine too. The line..

$background = GUICtrlCreatePic(@ScriptDir & '\Clock Background.bmp', 0, 0, 134, 94)
oÝ÷ Ù(hºW[zëw­©î׫±Ê+z«¨¶«¨¶)íàL=ø¥zv¦y«­¢+Ø(ÀÌØí­É½Õ¹ôU%
Ñɱ
ÉÑA¥¡MÉ¥ÁѥȵÀìÌäìÀäÈí
±½­} ­É½Õ¹¹µÀÌäì°À°À°ÄÌаäФ(

This made it work.

Oh, I didn't realize that whenever you post a script with spaces it changes them to underscores. I'll remember that for later... Edited by Piano_Man

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

here is a Binary Clock i made :) i used checkboxs as the binary numbers :)

#Include <Date.au3>

Global Const $GUI_CHECKED       = 1
Global Const $GUI_UNCHECKED     = 4

$nowtime = 0
Global $Checkboxsec[9], $Checkboxhour[9], $Checkboxmin[9]
$Form1 = GUICreate("AForm1", 150, 130, -1, -1, -1, 0x00000080+0x00000008)

;hour
$Checkboxhour[1] = GUICtrlCreateCheckbox("", 30, 70, 17, 17)
$Checkboxhour[2] = GUICtrlCreateCheckbox("", 30, 50, 17, 17)
$Checkboxhour[3] = GUICtrlCreateCheckbox("", 30, 30, 17, 17)
$Checkboxhour[4] = GUICtrlCreateCheckbox("", 30, 10, 17, 17)

$Checkboxhour[5] = GUICtrlCreateCheckbox("", 10, 50, 17, 17)
$Checkboxhour[6] = GUICtrlCreateCheckbox("", 10, 70, 17, 17)

;min
$Checkboxmin[1] = GUICtrlCreateCheckbox("", 80, 70, 17, 17)
$Checkboxmin[2] = GUICtrlCreateCheckbox("", 80, 50, 17, 17)
$Checkboxmin[3] = GUICtrlCreateCheckbox("", 80, 30, 17, 17)
$Checkboxmin[4] = GUICtrlCreateCheckbox("", 80, 10, 17, 17)

$Checkboxmin[5] = GUICtrlCreateCheckbox("", 60, 70, 17, 17)
$Checkboxmin[6] = GUICtrlCreateCheckbox("", 60, 50, 17, 17)
$Checkboxmin[7] = GUICtrlCreateCheckbox("", 60, 30, 17, 17)

;sec
$Checkboxsec[1] = GUICtrlCreateCheckbox("", 130, 70, 17, 17)
$Checkboxsec[2] = GUICtrlCreateCheckbox("", 130, 50, 17, 17)
$Checkboxsec[3] = GUICtrlCreateCheckbox("", 130, 30, 17, 17)
$Checkboxsec[4] = GUICtrlCreateCheckbox("", 130, 10, 17, 17)

$Checkboxsec[5] = GUICtrlCreateCheckbox("", 110, 70, 17, 17)
$Checkboxsec[6] = GUICtrlCreateCheckbox("", 110, 50, 17, 17)
$Checkboxsec[7] = GUICtrlCreateCheckbox("", 110, 30, 17, 17)

;time
$Label1 = GUICtrlCreateLabel("", 10, 90, 130, 30, 1+0x1000)
GUICtrlSetFont($Label1,18,4,-1,"Comic Sans MS")

GUISetState()

do
    $Msg = GUIGetMsg()
    settime()
Until $Msg = -3

func settime()
    $time = StringSplit(_NowTime(3),":")
    $thistime = _NowTime(3)
    if IsArray($time) and $thistime <> $nowtime then
        setsec($time[3])
        setmin($time[2])
        sethour($time[1])
        GUICtrlSetData($Label1,$thistime)
        $nowtime = $thistime
    EndIf
EndFunc

Func setsec($sec)
    $sec1 = StringLeft($sec,1)
    $sec2 = StringRight($sec,1)
    if $sec2 = 0 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
    EndIf
    if $sec2 = 1 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[1],$GUI_CHECKED)
    EndIf
    if $sec2 = 2 then 
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[2],$GUI_CHECKED)
    EndIf
    if $sec2 = 3 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxsec[2],$GUI_CHECKED)
    EndIf
    if $sec2 = 4 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[3],$GUI_CHECKED)
    EndIf
    if $sec2 = 5 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxsec[3],$GUI_CHECKED)
    EndIf
    if $sec2 = 6 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[2],$GUI_CHECKED)
        GUICtrlSetState($Checkboxsec[3],$GUI_CHECKED)
    EndIf
    if $sec2 = 7 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxsec[2],$GUI_CHECKED)
        GUICtrlSetState($Checkboxsec[3],$GUI_CHECKED)
    EndIf
    if $sec2 = 8 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[4],$GUI_CHECKED)
    EndIf
    if $sec2 = 9 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxsec[4],$GUI_CHECKED)
    EndIf
    if $sec1 = 0 Then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
    EndIf
    if $sec1 = 1 Then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[5],$GUI_CHECKED)
    EndIf
    if $sec1 = 2 Then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[6],$GUI_CHECKED)
    EndIf
    if $sec1 = 3 Then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[5],$GUI_CHECKED)
        GUICtrlSetState($Checkboxsec[6],$GUI_CHECKED)
    EndIf
    if $sec1 = 4 then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[7],$GUI_CHECKED)
    EndIf
    if $sec1 = 5 then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[7],$GUI_CHECKED)
        GUICtrlSetState($Checkboxsec[5],$GUI_CHECKED)
    EndIf
    if $sec1 = 6 then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[7],$GUI_CHECKED)
        GUICtrlSetState($Checkboxsec[6],$GUI_CHECKED)
    EndIf
EndFunc

Func setmin($min)
    $min1 = StringLeft($min,1)
    $min2 = StringRight($min,1)
        if $min2 = 0 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
    EndIf
    if $min2 = 1 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[1],$GUI_CHECKED)
    EndIf
    if $min2 = 2 then 
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[2],$GUI_CHECKED)
    EndIf
    if $min2 = 3 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxmin[2],$GUI_CHECKED)
    EndIf
    if $min2 = 4 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[3],$GUI_CHECKED)
    EndIf
    if $min2 = 5 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxmin[3],$GUI_CHECKED)
    EndIf
    if $min2 = 6 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[2],$GUI_CHECKED)
        GUICtrlSetState($Checkboxmin[3],$GUI_CHECKED)
    EndIf
    if $min2 = 7 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxmin[2],$GUI_CHECKED)
        GUICtrlSetState($Checkboxmin[3],$GUI_CHECKED)
    EndIf
    if $min2 = 8 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[4],$GUI_CHECKED)
    EndIf
    if $min2 = 9 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxmin[4],$GUI_CHECKED)
    EndIf
    if $min1 = 0 Then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
    EndIf
    if $min1 = 1 Then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[5],$GUI_CHECKED)
    EndIf
    if $min1 = 2 Then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[6],$GUI_CHECKED)
    EndIf
    if $min1 = 3 Then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[5],$GUI_CHECKED)
        GUICtrlSetState($Checkboxmin[6],$GUI_CHECKED)
    EndIf
    if $min1 = 4 then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[7],$GUI_CHECKED)
    EndIf
    if $min1 = 5 then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[7],$GUI_CHECKED)
        GUICtrlSetState($Checkboxmin[5],$GUI_CHECKED)
    EndIf
    if $min1 = 6 then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxmin[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxmin[7],$GUI_CHECKED)
        GUICtrlSetState($Checkboxmin[6],$GUI_CHECKED)
    EndIf
EndFunc

Func sethour($hour)
    $hour1 = StringLeft($hour,1)
    $hour2 = StringRight($hour,1)
    if $hour1 = 0 then
        for $x = 1 to 2
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
    EndIf
    if $hour1 = 1 then
        for $x = 1 to 2
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[6],$GUI_CHECKED)
    EndIf
    if $hour1 = 2 then 
        for $x = 1 to 2
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[5],$GUI_CHECKED)
    EndIf
    if $hour2 = 0 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
    EndIf
    if $hour2 = 1 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[1],$GUI_CHECKED)
    EndIf
    if $hour2 = 2 then 
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[2],$GUI_CHECKED)
    EndIf
    if $hour2 = 3 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxhour[2],$GUI_CHECKED)
    EndIf
    if $hour2 = 4 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[3],$GUI_CHECKED)
    EndIf
    if $hour2 = 5 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxhour[3],$GUI_CHECKED)
    EndIf
    if $hour2 = 6 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[2],$GUI_CHECKED)
        GUICtrlSetState($Checkboxhour[3],$GUI_CHECKED)
    EndIf
    if $hour2 = 7 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxhour[2],$GUI_CHECKED)
        GUICtrlSetState($Checkboxhour[3],$GUI_CHECKED)
    EndIf
    if $hour2 = 8 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[4],$GUI_CHECKED)
    EndIf
    if $hour2 = 9 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxhour[1],$GUI_CHECKED)
        GUICtrlSetState($Checkboxhour[4],$GUI_CHECKED)
    EndIf
    if $hour1 = 0 Then
        for $x = 5 to 7
            GUICtrlSetState($Checkboxhour[$x],$GUI_UNCHECKED)
        Next
    EndIf
EndFunc


[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

here is a Binary Clock i made :) i used checkboxs as the binary numbers :)

This is cool, I never thought of using checkboxes... The only problem is that you can mess it up by the user checking the boxes..

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

This is cool, I never thought of using checkboxes... The only problem is that you can mess it up by the user checking the boxes..

hehe, it resets every second :) so if you mark 1 it changes it back.

basicly what i have done was to write every posible way the clock can go, like this.

if $sec = 1 then
        for $x = 1 to 4
            GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
        Next
        GUICtrlSetState($Checkboxsec[1],$GUI_CHECKED)
EndIf
if $sec = 2 then 
    for $x = 1 to 4
        GUICtrlSetState($Checkboxsec[$x],$GUI_UNCHECKED)
    Next
    GUICtrlSetState($Checkboxsec[2],$GUI_CHECKED)
EndIf

the clock resets every checkbox every second so if you check 1 it becomes unchecked after 1 second :)

Edited by Alek

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

For an easier way of setting the values, have a look at my Binary Clock (link in signature), the function is DisplayTime.


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

For an easier way of setting the values, have a look at my Binary Clock (link in signature), the function is DisplayTime.

Thanks, that will be easier then the way I'm doing it though.... :) I thought I had made my code pretty efficient... :) Oh well, your clock is cool, I like the right click options...

One question though:

Hours, minutes and seconds have 10 columns each to display time

Binary clocks only have six columns... Am I misunderstanding this?

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

What if i put it like this 10 (binary) is 2 and there are 2 hour columns etc (your thinking of rows)

Just a small joke.


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0