Last active
July 20, 2023 01:17
-
-
Save tdalon/6bd98a36ee20a978c4d76ca975b2a656 to your computer and use it in GitHub Desktop.
Universal Date Picker for Windows implemented with AutoHotkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Ctrl+, | |
^,:: ; CurrentDate | |
FormatTime, CurrentDateTime,, yyyy-MM-dd | |
SendInput %CurrentDateTime% | |
return | |
; Ctrl+. | |
^.:: ; DatePicker | |
DatePicker(sDate) | |
If !sDate ; empty= cancel | |
return | |
FormatTime, sDate, %sDate%, yyyy-MM-dd | |
SendInput %sDate% | |
return | |
; ----------------------- SUBFUNCTIONS ------------------------------- | |
DatePicker(ByRef DatePicker){ | |
Gui, +LastFound | |
gui_hwnd := WinExist() | |
Gui, Add, MonthCal, 4 vDatePicker | |
Gui, Add, Button, Default , &OK | |
Gui Add, Button, x+0, Cancel | |
Gui, Show , , Date Picker Calendar | |
WinWaitClose, AHK_ID %gui_hwnd% | |
return | |
ButtonOK: | |
Gui, submit ;, nohide | |
Gui, Destroy | |
;Gui, Hide | |
return | |
GuiEscape: | |
ButtonCancel: | |
GuiClose: | |
DatePicker := "" | |
Gui, Destroy | |
return | |
} |
Hello @tdalon,
I would like to thank you for this script. I used it many-many times, and recently forked it for my own needs: DatePickerGO.
I've also mentioned your script, as a base of mine app. Thank you again!
@bigbadplayer you're welcome! Many thanks for the feedback. Your app looks like more than a fork but a great extension.
You might want to look at my PowerTools for packaging it with Settings for AutoStart and changing the Hotkey
Thank you for the tip! I've just released some new features; but the next goal is a gui for settings, instead of direct edit of ini file. Your work is inspires and give great examples.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://tdalon.blogspot.com/2020/09/autohotkey-insert-date.html