Date in editbox, update via button??? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
CatBoiler
Posts: 5
Joined: 27 Nov 2017, 05:17

Date in editbox, update via button???

23 Mar 2018, 16:14

Hi, i try to edit a script i found, basically i have a Gui with a editbox which shows current time, i want to add a button that updates the time in the editbox.
this is only a part of the script

Code: Select all

FormatTime, CurrentDateTime,, MM/dd/yyyy HH:mm:ss
Gui, Add, Edit, x10 y10 w125 h21, %CurrentDateTime%
Gui, Add, Button, Default x10 y50 w70 h30 gButton, Update
Gui, Show, w200 h200,
return

Button:
{
??????????
return
}
hope this can be done, thx
User avatar
TheDewd
Posts: 1513
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Date in editbox, update via button???  Topic is solved

23 Mar 2018, 16:23

Code: Select all

#SingleInstance, Force

Gui, Add, Edit, x10 y10 w125 h21 vEdit1
GoSub, UpdateTime
Gui, Add, Button, Default x10 y50 w70 h30 gButton, Update
Gui, Show, w200 h200,
return

UpdateTime:
	FormatTime, CurrentDateTime,, MM/dd/yyyy HH:mm:ss
	GuiControl,, Edit1, % CurrentDateTime
return

Button:
	GoSub, UpdateTime
return
CatBoiler
Posts: 5
Joined: 27 Nov 2017, 05:17

Re: Date in editbox, update via button???

23 Mar 2018, 16:26

TheDewd wrote:

Code: Select all

#SingleInstance, Force

Gui, Add, Edit, x10 y10 w125 h21 vEdit1
GoSub, UpdateTime
Gui, Add, Button, Default x10 y50 w70 h30 gButton, Update
Gui, Show, w200 h200,
return

UpdateTime:
	FormatTime, CurrentDateTime,, MM/dd/yyyy HH:mm:ss
	GuiControl,, Edit1, % CurrentDateTime
return

Button:
	GoSub, UpdateTime
return

awesome, and so simple, tyvm

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], just me and 322 guests