Sign in to follow this  
Followers 0
bobheart

Show Time

7 posts in this topic

I'm trying to show the time in the gui but from the help file nothing showing how it is done so not sure how to do it . I have this but it just just the @min etc .

How do you show the time or and date in the gui ?

#cs - ### Generated by AutoBuilder 0.4 -- do not modify ###

394 271

0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0

label $label_1 Label 1 30 30 170 50 0 0

#ce - ### End of Dump ###

;Script generated by AutoBuilder 0.4

Opt("GUICoordMode", 1)

Opt("GUINotifyMode", 1)

GuiCreate("MyGUI", 392,266,(@DesktopWidth-392)/2, (@DesktopHeight-266)/2 , 0x04CF0000)

$label_1 = GUISetControl("label", ("@HOUR ,@MIN,@SEC "), 30, 30, 170, 50)

GuiShow()

While 1

    sleep(100)

    $msg = GuiMsg(0)

    Select

    Case $msg = -3

        Exit

    Case $msg = 0

        ;;;

    Case $msg = $label_1

      ;;;

    EndSelect

WEnd

Exit

Share this post


Link to post
Share on other sites



Anyone ?

Share this post


Link to post
Share on other sites

are you looking for maybe this here or am i way off?

Opt ("GUICoordMode", 1)
Opt ("GUINotifyMode", 1)
GUICreate("MyGUI", 392, 266, (@DesktopWidth - 392) / 2, (@DesktopHeight - 266) / 2, 0x04CF0000)

$LABEL_1 = GUISetControl("label", @HOUR & ":" & @MIN & ":" & @SEC, 30, 30, 170, 50)

GUIShow()

While 1
    Sleep(100)
    $MSG = GUIMsg(0)
    Select
        Case $MSG = -3
            Exit
        Case $MSG = 0
        ;;;
        Case $MSG = $LABEL_1
        ;;;
    EndSelect
Wend
Exit

hope it helps. :ph34r:


our father, who art in heaven, and to the republic for which it stands, thy kingdom come, one nation, indivisible, as it is in heaven, give us this day as we forgive those who so proudly we hail, and crown thy good into temptation, but deliver us from the twilight. amen.

Share this post


Link to post
Share on other sites

Yes thats what I was looking for . I guess the sec's don't change in the gui unless you refresh the gui .

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Yes thats what I was looking for . I guess the sec's don't change in the gui unless you refresh the gui .

<{POST_SNAPBACK}>

Here's how you want it:

Opt ("GUICoordMode", 1)
Opt ("GUINotifyMode", 1)
GUICreate("MyGUI", 392, 266, (@DesktopWidth - 392) / 2, (@DesktopHeight - 266) / 2, 0x04CF0000)

$LABEL_1 = GUISetControl("label", "", 30, 30, 170, 50)

GUIShow()

$x = 1
While 1
    $MSG = GUIMsg(0)
    Select
        Case $MSG = -3
            Exit
        Case $MSG = 0
       ;;;
        Case $MSG = $LABEL_1
       ;;;
    EndSelect
    
    If $x = 9 Then
       $x = 0
       GUIWrite($LABEL_1, 0, @HOUR & ":" & @MIN & ":" & @SEC)
    EndIf
    $x = $x + 1
    Sleep(100)
Wend
Exit
Edited by SlimShady

Share this post


Link to post
Share on other sites

Thanks Slim that works nice ..

Share this post


Link to post
Share on other sites

I noticed that sometimes it skips a second.

I fixed it.

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