How to determine title and additional infos from an open window for use with Autohotkey?

自作多情 提交于 2019-12-13 08:49:38

问题


To access and control a window, dialog or popup with Autohotkey the title of that specific window is needed. For some windows the title can be read directly if its visible, but some windows hide it. The window class and the exe (ahk_class and ahk_exe) aren't visible at all. How to gather this information reliable?


回答1:


Use the Window Spy tool, which is installed together with AHK, it can be started various ways:

  • Right click the tray icon of a running AHK script and select Window Spy
  • Start the AU3_Spy.exe in the AHK installation folder
  • Use the Windows search to search for Window Spy

You will get a window called Active Window Info with various infos about your current active (topmost) window. The first box is the one you need.

Example

The box gives title, class and .exe to detect the target window of which every line can be used to identify the window. Now you should activate the window you want to address and copy the information.

Hint: You can (un-)freeze the display with Win + A



来源:https://stackoverflow.com/questions/35071472/how-to-determine-title-and-additional-infos-from-an-open-window-for-use-with-aut

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!