Jump to content

show time in gui window


bobheart
 Share

Recommended Posts

Umm this won't work ? this close ?

#cs - ### Generated by AutoBuilder 0.4 -- do not modify ###
394 224
0   1   0   0   0   1   0   0   0   0   0   0   0   0   0   0   
button  $button_1   Button 1    20  60  120 20  0   0   
edit    $edit_1 Edit 1  80  150 230 30  0   0   
#ce - ### End of Dump ###

;Script generated by AutoBuilder 0.4


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

$button_1 = GUISetControl("button", "Button 1", 20, 60, 120, 20)
$edit_1 = GUISetControl("edit", "edit_1", 80, 100, 230, 90)

GuiShow()

While 1
    sleep(100)
    $msg = GuiMsg(0)
    Select
    Case $msg = -3
        Exit
    Case $msg = 1
       ;;;
    Case $msg = $button_1
       ;;;
    Case $msg = $edit_1
    (""& @HOUR &"" ,""& @MIN &"","" & @SEC & "")
    EndSelect
WEnd
Exit
Link to comment
Share on other sites

And how would you want AutoIt to interpret this line? There's no command, only a few strange characters thrown together. Do you want AutoIt to guess what you want?

Remember that you have to tell the computer what it should do, not write something and let the computer guess what you want.

Link to comment
Share on other sites

#cs - ### Generated by AutoBuilder 0.4 -- do not modify ###
394 224
0   1   0   0   0   1   0   0   0   0   0   0   0   0   0   0   
button  $button_1   Button 1    20  60  120 20  0   0   
edit    $edit_1 Edit 1  80  150 230 30  0   0   
#ce - ### End of Dump ###

;Script generated by AutoBuilder 0.4


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

$button_1 = GUISetControl("button", "Button 1", 20, 60, 120, 20)
$edit_1 = GUISetControl("edit", "edit_1", 80, 100, 230, 90)

GuiShow()

While 1
    sleep(100)
    $msg = GuiMsg(0)
    Select
        Case $msg = -3
            ExitLoop
        Case $msg = 1
          ;;;
        Case $msg = $button_1
          ;;;
        Case $msg = $edit_1
            GUIWrite($edit_1, 0, @HOUR & " ," & @MIN & "," & @SEC)
    EndSelect
WEnd
GUIDelete()
Exit

Link to comment
Share on other sites

#cs - ### Generated by AutoBuilder 0.4 -- do not modify ###
394 224
0   1   0   0   0   1   0   0   0   0   0   0   0   0   0   0   
button  $button_1   Button 1    20  60  120 20  0   0   
edit    $edit_1 Edit 1  80  150 230 30  0   0   
#ce - ### End of Dump ###

;Script generated by AutoBuilder 0.4


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

$button_1 = GUISetControl("button", "Button 1", 20, 60, 120, 20)
$edit_1 = GUISetControl("edit", "edit_1", 80, 100, 230, 90)

$Time = @HOUR & ":" & @MIN & "." & @SEC
$PrevTime = $Time
$time_control = GUISetControl("label", $Time, 250, 30, 80, 25)
GUISetControlFont(-1, 16, 600, "Garamond")

GuiShow()
$x = 0

While 1
    sleep(100)
    $msg = GuiMsg(0)
    Select
        Case $msg = -3
            ExitLoop
        Case $msg = 1
         ;;;
        Case $msg = $button_1
         ;;;
        Case $msg = $edit_1
    EndSelect
    $x = $x + 1
    $Time = @HOUR & ":" & @MIN & "." & @SEC
    If $x = 9 OR $PrevTime <> $Time Then
        GUIWrite($time_control, 0, $Time)
        $PrevTime = $Time
        $x = 0
    EndIf
WEnd
GUIDelete()
Exit

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...