AHK_automatic transition_GUI Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
inseption86
Posts: 198
Joined: 19 Apr 2018, 00:24

AHK_automatic transition_GUI

Post by inseption86 » 30 May 2023, 09:12

is it possible to make automatic transition between date month and year in GUI?
Attachments
Video_2023-05-30_170905.gif
Video_2023-05-30_170905.gif (40.97 KiB) Viewed 217 times

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: AHK_automatic transition_GUI  Topic is solved

Post by mikeyww » 30 May 2023, 09:39

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

Post Reply

Return to “Ask for Help (v1)”