Blank DateTime Box

Get help with using AutoHotkey and its commands and hotkeys
hasantr
Posts: 134
Joined: 05 Apr 2016, 14:18

Blank DateTime Box

26 Oct 2018, 05:53

I want the DateTime box to be empty when the macro runs. I searched a lot, but I couldn't find a way. Can you help me.

As for the gui at the moment, my computer's clock in the DateTime box is coming. But I want it to come in 00:00:00. Thank you.

Code: Select all

Gui, Add, Text, x3 y11 w65 h20 , Geri Sayım:
Gui, Add, DateTime, x55 y9 wp hp vStartTime 1, HH:mm:ss ;time


Gui, Add, Button, x20 y35 w85 h22 Default, &TAMAM
Gui, Show, w125 h65, AHK-Scheduler

Return


ButtonTAMAM:
Gui, submit, nohide

FormatTime, StartTime, %StartTime%, HH:mm:ss,

aTime := StrSplit(StartTime, ":")
seconds := aTime.1 * 3600 + aTime.2 * 60 + aTime.3


global i
i := seconds
;InputBox, i, Geri Sayım, Kaç Saniye, , 90, 130

Gui, 1:Destroy

while(i > 0)
{
	Sleep, 1000
	a := FormatSeconds(i)
	ToolTip, %a%, 25, 5, 1
	i -= 1
}
ToolTipOff:
WinShow, To Do List
ExitApp

FormatSeconds(NumberOfSeconds)  ; Convert the specified number of seconds to hh:mm:ss format.
{
	time = 19990101  ; *Midnight* of an arbitrary date.
	time += %NumberOfSeconds%, seconds
	FormatTime, mmss, %time%, mm:ss
	return NumberOfSeconds//3600 ":" mmss
	/*
    ; Unlike the method used above, this would not support more than 24 hours worth of seconds:
		FormatTime, hmmss, %time%, h:mm:ss
		return hmmss
	*/
}

return

Esc::
ButtonCancel/Exit:
GuiClose:
ExitApp
User avatar
YoucefHam
Posts: 255
Joined: 24 Aug 2015, 12:56
Facebook: YoucefHamDz

Re: Blank DateTime Box

26 Oct 2018, 06:56

try this

Code: Select all

Gui, Add, DateTime, % "x55 y9  hp vStartTime 1 Choose" A_YYYY A_MM A_DD "00 24 00 00"  , HH:mm:ss
https://autohotkey.com/docs/commands/Gu ... m#DateTime
:wave: There is always more than one way to solve a problem. ;)
hasantr
Posts: 134
Joined: 05 Apr 2016, 14:18

Re: Blank DateTime Box

19 Nov 2018, 00:56

YoucefHam wrote:
26 Oct 2018, 06:56
try this

Code: Select all

Gui, Add, DateTime, % "x55 y9  hp vStartTime 1 Choose" A_YYYY A_MM A_DD "00 24 00 00"  , HH:mm:ss
https://autohotkey.com/docs/commands/Gu ... m#DateTime
Thank you very much.

Return to “Ask For Help”

Who is online

Users browsing this forum: niczoom, Wi11ow and 41 guests