Jump to content

Is there a function in autoIt to obtain the current time?


blender
 Share

Recommended Posts

As the title says, Is there a function in autoIt to obtain the current time? I tried TimerInit() but it doesn't give me the actual time.

Another question I have here is that I want to compare to strings. I want to check if string A contains string B. Is it possible to do it in autoIt?

Thank you in advance!

Link to comment
Share on other sites

#include <GUIConstants.au3>

HotKeySet("{ESC}", "_Exit")
$GUI = GUICreate("Time", 150, 100, -1, -1)
$Time = GUICtrlCreateLabel(@HOUR & ":" & @MIN & ":" & @SEC, 10, 25, 150, 100)
GUICtrlSetFont($Time, 25)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Select
    Case $nMsg = $GUI_EVENT_CLOSE
        ExitLoop
    EndSelect
    GUICtrlSetData($Time, @HOUR & ":" & @MIN & ":" & @SEC)
WEnd

Func _Exit()
    Sleep(500)
    Exit
EndFunc

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

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