Know when a window opens
Re: Know when a window opens
I doubt it.
You might be able to use a loop that waits for a window title-- boiler's response to your initial post. There could be other approaches as well, using UI Automation to count the number of tabs, etc.
A browser tab is not (always) a window, but a WinWait might still be able to detect a tab title, depending on the browser and how it manages window titles.
You might be able to use a loop that waits for a window title-- boiler's response to your initial post. There could be other approaches as well, using UI Automation to count the number of tabs, etc.
A browser tab is not (always) a window, but a WinWait might still be able to detect a tab title, depending on the browser and how it manages window titles.
Re: Know when a window opens
mikeyww:
your example is clear and useful, I am studying it.
What is the meaning of this:
[EVENT_SYSTEM_MOVESIZESTART, EVENT_SYSTEM_MOVESIZEEND]
into the function call
HookEvent("WinEventProc", [EVENT_OBJECT_HIDE,EVENT_OBJECT_SHOW])
What is the meaning of [...]?
Another query:
HookEvent(...) allows 4 arguments; the third argument is the PID ( Process IDenfier ): is it possible to obtain it by an AutoHotKey function?
If no, how is possible to obtain it?
mikeyww: are you an AutoHotKey developer?
your example is clear and useful, I am studying it.
What is the meaning of this:
[EVENT_SYSTEM_MOVESIZESTART, EVENT_SYSTEM_MOVESIZEEND]
into the function call
HookEvent("WinEventProc", [EVENT_OBJECT_HIDE,EVENT_OBJECT_SHOW])
What is the meaning of [...]?
Another query:
HookEvent(...) allows 4 arguments; the third argument is the PID ( Process IDenfier ): is it possible to obtain it by an AutoHotKey function?
If no, how is possible to obtain it?
mikeyww: are you an AutoHotKey developer?
Re: Know when a window opens
You can read these things in the documentation.
https://www.autohotkey.com/docs/misc/Arrays.htm
https://www.autohotkey.com/docs/commands/WinGet.htm#PID
I do not develop AutoHotkey!
https://www.autohotkey.com/docs/misc/Arrays.htm
https://www.autohotkey.com/docs/commands/WinGet.htm#PID
I do not develop AutoHotkey!
Re: Know when a window opens
Then the PID is the same like returned by WinGet, var, PID
I am documeting well all ( all functions and all constants ): at the end do you think it can be interesting to send it here?
Please can you explain the meaning of the 7 arguments of the UDF function that must be declared in the first argument of HookEvent( ... )?
What is the handle to an event hook function?
What is the handle to the window gerates event? How I can search it by AutoHotKey function?
What is the thread id?
Thank you very much.
I am documeting well all ( all functions and all constants ): at the end do you think it can be interesting to send it here?
Please can you explain the meaning of the 7 arguments of the UDF function that must be declared in the first argument of HookEvent( ... )?
What is the handle to an event hook function?
What is the handle to the window gerates event? How I can search it by AutoHotKey function?
What is the thread id?
Thank you very much.
Re: Know when a window opens
I did not test the script with PID, but that is my guess. You can always try it.
You may want to ask the script's author some of your questions. I would also do some basic reading.
viewtopic.php?t=42657
https://learn.microsoft.com/en-us/windows/win32/winauto/event-constants
You may want to ask the script's author some of your questions. I would also do some basic reading.
viewtopic.php?t=42657
https://learn.microsoft.com/en-us/windows/win32/winauto/event-constants
Re: Know when a window opens
I sent questions to author, but I think it will no answer me because the last communication is on the 2018...
I searched the CHILDID_SELF value: is was very difficult and I found 0: is it true?
I red all informations about all constants, thank you very much.
Thank you very much.
I searched the CHILDID_SELF value: is was very difficult and I found 0: is it true?
I red all informations about all constants, thank you very much.
Thank you very much.
Last edited by Archimede on 26 Nov 2022, 12:20, edited 1 time in total.
Re: Know when a window opens
Sorry, but I don't know much beyond the two pages that I have cited above!
Re: Know when a window opens
Perhaps this might help? Although this helps only in knowing the title of the tab.MancioDellaVega wrote: ↑26 Nov 2022, 07:51@mikeyww
Is it possible use that technique to intercept the opening of a new tab in the chrome browser
and know what is the title of that tab?
viewtopic.php?f=74&t=107438
-
- Posts: 83
- Joined: 16 May 2020, 12:27
- Location: Italy
Re: Know when a window opens
Yep..very good alternative...thanks.GameNtt wrote: ↑12 Dec 2022, 12:15Perhaps this might help? Although this helps only in knowing the title of the tab.MancioDellaVega wrote: ↑26 Nov 2022, 07:51@mikeyww
Is it possible use that technique to intercept the opening of a new tab in the chrome browser
and know what is the title of that tab?
viewtopic.php?f=74&t=107438
Courses on AutoHotkey
Re: Know when a window opens
Hallo.
I am testing the use of the HookEvent(...) function.
I call it only for a single process, specifyng the Process ID.
I need to know a thing: if the process automatically closes by itself, must I use the UnHook(...) function?
If I use the HookEvent(...) function for 10 processes, and only one closes by itself, how I can use UnHook(...) for close the waiting only for that process?
I hope to be clear, it is difficult to understand all...
I am testing the use of the HookEvent(...) function.
I call it only for a single process, specifyng the Process ID.
I need to know a thing: if the process automatically closes by itself, must I use the UnHook(...) function?
If I use the HookEvent(...) function for 10 processes, and only one closes by itself, how I can use UnHook(...) for close the waiting only for that process?
I hope to be clear, it is difficult to understand all...