- This script is working for me on the Notepad (Windows 7) Save As dialog.
Code: Select all
;based on:
;GUI COMMANDS: COMPLETE RETHINK - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=5&t=25893&p=132424#p132424
;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
return
- 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
http://stackoverflow.com/questions/2895 ... vefilename