Sign in to follow this  
Followers 0
au3scr

Clock

7 posts in this topic

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

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites

how i use "adlib"?

Can you make script with "adlib"


Share this post


Link to post
Share on other sites

how i use "adlib"?

Can you make script with "adlib"

I can.... can you? :)

Look up AdlibEnable in the help


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
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

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites

Thanks alot :)


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