blender Posted November 22, 2007 Posted November 22, 2007 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!
AlmarM Posted November 22, 2007 Posted November 22, 2007 #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.
tW34k Posted November 22, 2007 Posted November 22, 2007 #include <Date.au3> $time = _NowCalc() MsgBox( 4096, "Time", $time) If you don't want the date you can just modify it.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now