NotNull > 2022-04-08 09:47
Quote:If the dialog box is not an Open or Save As dialog box, if it is an Options dialog box instead, for example, QAP cannot detect it (because all dialog boxes have the same class name “#32770”, regardless of the dialog box task) and QAP will act as if it was a file dialog box.
To change folder, QAP tries to change the content of a text field of the dialog box named internally “Edit1” or “Edit2” (in a file dialog box, this field is usually labeled File name). If it succeeds, QAP sends “Enter” to press the OK button of the dialog box. In a file dialog box, it changes the current folder in the dialog box. Then, QAP restores the initial content of the Filename field and stops, letting the user continue his work.
;_____________________________________________________________________________
;
SmellsLikeAFileDialog(_thisID )
;_____________________________________________________________________________
;
{
; Only consider this dialog a possible file-dialog when:
; (SysListView321 AND ToolbarWindow321) OR (DirectUIHWND1 AND ToolbarWindow321) controls detected
; First is for Notepad++; second for all other filedialogs
; Returns dialogtype (General/SyslistView) or 0/FALSE
WinGet, _controlList, ControlList, ahk_id %_thisID%
Loop, Parse, _controlList, `n
{
If ( A_LoopField = "SysListView321" )
_SysListView321 := 1
If ( A_LoopField = "ToolbarWindow321")
_ToolbarWindow321 := 1
If ( A_LoopField = "DirectUIHWND1" )
_DirectUIHWND1 := 1
If ( A_LoopField = "Edit1" )
_Edit1 := 1
}
If ( _DirectUIHWND1 and _ToolbarWindow321 and _Edit1 )
{
Return "GENERAL"
}
Else If ( _SysListView321 and _ToolbarWindow321 and _Edit1 )
{
Return "SYSLISTVIEW"
}
else
{
Return FALSE
}
}Jean Lalonde > 2022-04-08 14:48
Jean Lalonde > 2022-05-25 09:01
Jean Lalonde > 2022-06-02 14:46