c**t 发帖数: 2744 | 1 How to write script/prog to kill a window without title?
If it has title, easy to setfocus and send alt-F4 to kill it.. but if it
doesn't have title, how to do it?
The AutoIt v3 reports the window info:
Press CTRL-ALT-F to freeze the display.
>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title:
Class: #32770
Size: X: 238 Y: 111 W: 548 H: 512
>>>>>>>>>>> Mouse Details <<<<<<<<<<<
Screen: X: 425 Y: 203
Cursor ID: 5
>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB: Hex: 0xFFFFF | L*********r 发帖数: 92 | 2 If the window which you talk about is window on win os,
in programming, the elegant way to kill a window is send a close message or
calling destroywindow api.
Different tech may provides high level api to wrap the two ways.
To kill a window without title or safely kill a window with title, it is not
easy. In my experience, first I get the window hwnd. Then get the related
process using the hwnd, if the process is what i deal with, i destroy the
window. It is implement in c++. I am not sure that |
|