Direct path to changing time format in win11

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
deets
Posts: 34
Joined: 29 Mar 2022, 02:00

Direct path to changing time format in win11

Post by deets » 18 Mar 2023, 20:04

Is there a direct path to this window as shown in the arrow?

timedate.cpl doesn't take me to the right window.
image.png
image.png (153.71 KiB) Viewed 234 times

Emile HasKey
Posts: 27
Joined: 06 Mar 2022, 17:45

Re: Direct path to changing time format in win11

Post by Emile HasKey » 28 Mar 2023, 17:56

The best I could do is this:

Code: Select all

; open Region > Formats > Customise Format > Date (Windows 10)
Run, intl.cpl

WinWait, Region ahk_class #32770
hWnd := WinExist()
ControlGetText, btn_text, Button3, % "ahk_id " hWnd
if (btn_text = "A&dditional settings...")
	ControlSend, Button3, {Space}, % "ahk_id " hWnd
else
	return

WinWait, Customi ahk_class #32770 ; Customise Format (or Customize Format)
hWnd := WinExist()
; see https://www.autohotkey.com/docs/v1/lib/Control.htm#TabLeft
SendMessage, 0x1330, 3,, SysTabControl321, % "ahk_id " hWnd ; TCM_SETCURFOCUS
Sleep, 0
SendMessage, 0x130C, 3,, SysTabControl321, % "ahk_id " hWnd ; TCM_SETCURSEL
return
I can get to the 2nd tab of the 1st pop-up window directly by doing this:

Code: Select all

; open Region > Administrative
Run, % "control intl.cpl,,1"
return
Maybe you can just use RegWrite instead, to modify the registry.
There's some relevant info here:
Opening and editing Customize Format in Region

Post Reply

Return to “Ask for Help (v1)”