AHK_automatic transition_GUI Topic is solved
-
- Posts: 198
- Joined: 19 Apr 2018, 00:24
AHK_automatic transition_GUI
is it possible to make automatic transition between date month and year in GUI?
- Attachments
-
- Video_2023-05-30_170905.gif (40.97 KiB) Viewed 217 times
Re: AHK_automatic transition_GUI Topic is solved
Here is a starting example that you can adjust.
Code: Select all
#Requires AutoHotkey v1.1.33
dateFormat := "dd.MM.yyyy"
cnt := 0
Gui Font, s10
Gui Add, DateTime, vdate, % dateFormat
Gui Show
#If WinActive("ahk_class AutoHotkeyGUI")
~1::
~2::
~3::
~4::
~5::
~6::
~7::
~8::
~9::
~0::
last := date2
Sleep 50
Gui Submit, NoHide
FormatTime date2, % date, % dateFormat
Switch {
Case !last: cnt++
Case SubStr(date2, 7) = SubStr(last, 7):
If (++cnt = 2) {
Send {Right}
cnt := 0
}
Default: cnt := 0
}
Return
#If