- This script is working for me on the Notepad (Windows 7) Save As dialog.
- IIRC, it is only by using CBN_SELENDOK := 9 that I have been able to successfully use ComboBoxes on Open/Save As dialogs on Windows 7. The problem was very noticeable when I moved from Windows XP to Windows 7.
;GUI COMMANDS: COMPLETE RETHINK - AutoHotkey Community
;tested on Windows 7
q:: ;Notepad (Open/Save As dialog) - set ComboBox to UTF-8
Control, ChooseString, UTF-8, ComboBox3, A
ControlGet, hCtl, Hwnd,, ComboBox3, A
hWndParent := DllCall("user32\GetParent", Ptr,hCtl, Ptr)
;CBN_SELENDOK := 9
SendMessage, 0x111, % (9 << 16), % hCtl,, % "ahk_id " hWndParent ;WM_COMMAND := 0x111
- The original script I based the code on used GetWindowLong with GWL_ID, not GetDlgCtrlID:
windows - How to simulate selection change in the "file type" ComboBox in GetSaveFileName dialog from a separate process? - Stack Overflow