Jump to content

Clock


au3scr
 Share

Recommended Posts

My clock dont work here, how i should do it?

#include <GUICONSTANTS.au3>
    
    $t = GUICreate ("Clock",200,50)
    $time = GUICtrlCreateLabel ("Time is: "&@HOUR&":"&@Min&":"&@SEC,10,10)
    GUISetState(@SW_SHOW)
    While 1
        $tMsg = GUIGetMsg()
        Switch $tMsg
            Case $GUI_EVENT_CLOSE
                GUIDelete($t)
                ExitLoop
        EndSwitch
    WEnd
    
    $wait = 1000
    
While 1
    Sleep($wait)
    Do_Function()
WEnd

Func Do_Function()
    $time = "Time is: "&@HOUR&":"&@Min&":"&@SEC
EndFunc   ;==>Do_Functio
Link to comment
Share on other sites

My clock dont work here, how i should do it?

#include <GUICONSTANTS.au3>
    
    $t = GUICreate ("Clock",200,50)
    $time = GUICtrlCreateLabel ("Time is: "&@HOUR&":"&@Min&":"&@SEC,10,10)
    GUISetState(@SW_SHOW)
    While 1
        $tMsg = GUIGetMsg()
        Switch $tMsg
            Case $GUI_EVENT_CLOSE
                GUIDelete($t)
                ExitLoop
        EndSwitch
    WEnd
    
    $wait = 1000
    
While 1
    Sleep($wait)
    Do_Function()
WEnd

Func Do_Function()
    $time = "Time is: "&@HOUR&":"&@Min&":"&@SEC
EndFunc   ;==>Do_Functio
try using adlib, your second while won't be reached until you exit the 1st while loop as you currently have it.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Still dont work

#include <GUICONSTANTS.au3>
    
    $t = GUICreate ("Kell",200,50)
    $aeg = GUICtrlCreateLabel ("kell on: "&@HOUR&":"&@Min&":"&@SEC,10,10)
    GUISetState(@SW_SHOW)
    While 1
        $tMsg = GUIGetMsg()
        Switch $tMsg
            Case $GUI_EVENT_CLOSE
                GUIDelete($t)
                ExitLoop
        EndSwitch
    WEnd
    
AdlibEnable ("Do_Function",1000)

Func Do_Function()
    $aeg = "kell on: "&@HOUR&":"&@Min&":"&@SEC
EndFunc   ;==>Do_Functio
Link to comment
Share on other sites

Still dont work

#include <GUICONSTANTS.au3>
    
    $t = GUICreate ("Kell",200,50)
    $aeg = GUICtrlCreateLabel ("kell on: "&@HOUR&":"&@Min&":"&@SEC,10,10)
    GUISetState(@SW_SHOW)
    While 1
        $tMsg = GUIGetMsg()
        Switch $tMsg
            Case $GUI_EVENT_CLOSE
                GUIDelete($t)
                ExitLoop
        EndSwitch
    WEnd
    
AdlibEnable ("Do_Function",1000)

Func Do_Function()
    $aeg = "kell on: "&@HOUR&":"&@Min&":"&@SEC
EndFunc   ;==>Do_Functio

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...