as shown in the following figure, I need to wait for the AHK to monitor the save dialog box in IE before doing anything else.
as shown in the following figure, I need to wait for the AHK to monitor the save dialog box in IE before doing anything else.
generally speaking, the first thing to do is to use OnMessage to listen for messages. You may use DLLCALL, to call the system API, but I'm not sure which one to use. I've seen other people use it like this before. Post the code here. This code can monitor a lot of interface changes, which may enlighten your question. The comments in it are not quite right, because I have changed it several times, but the core part is fine.
; -sharp ShellMessage()
Gui +LastFound
hWnd := WinExist()
DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
;"MsgNum","ShellMessage"
OnMessage( MsgNum, "ShellMessage")
; -sharp
cn_win := ["Win_10_VM - VMware Workstation"]
loop % cn_win.MaxIndex()
GroupAdd,cn,% cn_win[A_Index]
ShellMessage( wParam,lParam ) {
;1
;2
;3 SHELL
;4
;5
;6 Windows
;7
;8
;9
;10
;11
;12 APPCOMMANDWM_APPCOMMAND
;13 wParam=hWnd
;14 wParam=hWnd
;&H8000&
;53
;54
;32772
;
if ( wParam = 1 )
{
Sleep, 1000
return
}
;
if ( wParam = 32772 ){
if WinActive("Win_10_VM"){
MsgBox,3
}
return
}
}
I have a * .ahk file on my desktop. Double-click it to run it directly. If you want to edit it with notepadPP, you need to click the right mouse button and select the "Edit with notepadPP " option to open it. is there any good way, for example, you c...