Sign in to follow this  
Followers 0
Scriptkiddi3

Binary Clock

1 post in this topic

#1 ·  Posted (edited)

Whole the time I was scripting: (MS Sam voice) "This is the speaking clock, made by forever." :P

Check this:

HotKeySet("{F9}", "on")

HotKeySet("{F10}", "regularclockon")

HotKeySet("{F11}", "stop")

TrayTip("Controls", "F9 to toggle the binary clock on and off" & @CRLF & "F10 to toggle the regular clock on and off" & @CRLF & "F11 to shutdown the program", 1)

$on = 1

$reg = 0

While 1

While $on = 1

$hour = StringSplit(@HOUR, "", 1)

$min = StringSplit(@MIN, "", 1)

$sec = StringSplit(@SEC, "", 1)

If $reg = 1 Then

$tooltip = @HOUR & " " & @MIN & " " & @SEC & @CRLF & @CRLF

Else

$tooltip = ""

EndIf

$tooltip = $tooltip & "0"

If $hour[2]>= 8 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

$tooltip = $tooltip & " "

$tooltip = $tooltip & "0"

If $min[2] >= 8 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

$tooltip = $tooltip & " "

$tooltip = $tooltip & "0"

If $sec[2] >= 8 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

$tooltip = $tooltip & @CRLF

$tooltip = $tooltip & "0"

If $hour[2] >= 4 And $hour[2] < 8 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

$tooltip = $tooltip & " "

If $min[1] >= 4 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

If $min[2] >= 4 And $min[2] < 8 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

$tooltip = $tooltip & " "

If $sec[1] >= 4 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

If $sec[2] >= 4 And $sec[2] < 8 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

$tooltip = $tooltip & @CRLF

If $hour[1] < 1 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

If $hour[2] = 2 Or $hour[2] = 3 Or $hour[2] = 6 Or $hour[2] = 7 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

$tooltip = $tooltip & " "

If $min[1] = 2 Or $min[1] = 3 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

If $min[2] = 2 Or $min[2] = 3 Or $min[2] = 6 Or $min[2] = 7 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

$tooltip = $tooltip & " "

If $sec[1] = 2 Or $sec[1] = 3 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

If $sec[2] = 2 Or $sec[2] = 3 Or $sec[2] = 6 Or $sec[2] = 7 Then

$tooltip = $tooltip & "1"

Else

$tooltip = $tooltip & "0"

EndIf

$tooltip = $tooltip & @CRLF

If even($hour[1]) Then

$tooltip = $tooltip & "0"

Else

$tooltip = $tooltip & "1"

EndIf

If even($hour[2]) Then

$tooltip = $tooltip & "0"

Else

$tooltip = $tooltip & "1"

EndIf

$tooltip = $tooltip & " "

If even($min[1]) Then

$tooltip = $tooltip & "0"

Else

$tooltip = $tooltip & "1"

EndIf

If even($min[2]) Then

$tooltip = $tooltip & "0"

Else

$tooltip = $tooltip & "1"

EndIf

$tooltip = $tooltip & " "

If even($sec[1]) Then

$tooltip = $tooltip & "0"

Else

$tooltip = $tooltip & "1"

EndIf

If even($sec[2]) Then

$tooltip = $tooltip & "0"

Else

$tooltip = $tooltip & "1"

EndIf

If $reg = Not 1 Then

ToolTip($tooltip, @DesktopWidth - (52 / 1152 * @DesktopWidth), @DesktopHeight - (59 / 864 * @DesktopHeight))

Sleep(10)

Else

ToolTip($tooltip, @DesktopWidth - (52 / 1152 * @DesktopWidth), @DesktopHeight - (85 / 864 * @DesktopHeight))

EndIf

WEnd

Sleep(100)

WEnd

Func even($a)

If $a / 2 = Int($a / 2) Then

Return 1

Else

Return 0

EndIf

EndFunc

Func on()

If $on = 1 Then

ToolTip("")

EndIf

$on = Not $on

EndFunc

Func regularclockon()

$reg = Not $reg

EndFunc

Func stop()

$on = Not 1

TrayTip("Binary Clock", "Made by Scriptkiddie" & @CRLF & "Tested and *not yet ;-)* Approved by P'lo", 1)

Sleep(5000)

Exit

EndFunc

Well, this is the binary clock, made by Scriptkiddie! ;) Edited by Scriptkiddi3

[-"Scriptkiddie, nice to meet you!"-]

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